|
if you can't make it to a decent book store, there is always a virtual one. Try Amazon, it doesn't browse well, but it sure offers a wide choice of great books.
You are aware CodeProject hosts over 20,000 articles, and a reasonable fraction of those are interesting and good?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
You should also try to google for free vb.net books. There are a surprising amount of free (and perfectly legal) books that you can download, especially for beginners.
Another way to get you started, is to type "walkthrough" in the help/search section of your visual studio. It will provide a lot of step-by-step instructions on how to do all kinds of different things, and will give you some example code that you can copy and paste. That will give you something to start with, analyze and build upon.
My advice is free, and you may get what you paid for.
|
|
|
|
|
I need a nested GridView ctrl in vb or c#
not asp.net
bet i cant found it.
these ctrls are in asp.
please help me.
thanks
|
|
|
|
|
How to enable/disable network adapter in WinXP and Vista with VB.net code
|
|
|
|
|
Give it a new IPnumber?
Rozis
|
|
|
|
|
Without a damn good explanation to why you want to do this nobody will help you with this.
And even then it's very likely they won't.
Why? Because you should NEVER disable hardware on a pc. That's called a virus / malware and nobody here will help you with that.
|
|
|
|
|
I have friends that use NET in PPPoE protocol and sometimes they disable theire network adapter and call me with answer how to enable their network adapter. I understand how to enable and disable network adapter, I use devcon.exe download from here http://support.microsoft.com/kb/311272[^]
Thanks
|
|
|
|
|
|
No way is anyone going to do that. You can buy converteres, or you can put the code in a dll and just use it from there.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
For free; I don't think anyone would do that.
|
|
|
|
|
|
umm it should be pretty straight forward ....
just remember in C#
dim MyString as String = ""
=
string MyString = ""; <-- Dont Forget The ';'
if (...) then
...
else
...
end if
=
if (...){
...
}else{
...}
and so on ... any .NET programmer worth his salt should be able to do this.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
OK, this are bad news for me...
Does someone know a similar project in VB?
Last but not least: thankyou for your help.
|
|
|
|
|
Get .NET Reflector here: http://www.red-gate.com/products/reflector/[^]
Get file disassembler plugin for Reflector here: http://www.denisbauer.com/NETTools/FileDisassembler.aspx[^]
Then just disassemble compiled project into VB.
You'll get messy list of files but it will compile and will work, and you'll probably get what you need.
However - my main comment is - don't stuck on one language! Learn VB.NET and C#.
P.S. If you're asking someone to do your job every time - this means that you'll never get your own brains working.
------------------------------------------------------------
Want to be happy - do what you like!
|
|
|
|
|
Hello Every One
I am having one listview in that i am adding one column like
me.listview1.column.add("Rupees,50,Horizontal.centre")
now i fetch records from database in it
for filling listview and it worked
but the problem is i want to add the Rupees of listview and display it in one label
For that my code is like:
dim i as string
dim n as integer
dim t as integer =me.listview1.count
for i = to t-1
n=i+me.listview1.selecteditem(0).subitem(1).text
me.label1.text=n
but this seems to be wrong code can u please suggest
some another...
i am beginner
Please help...
|
|
|
|
|
1) you have ' dim i as string ' but are using 'i' in the for next loop. change to 'as integer'
2) is your intention to add up all the selected items? if so, you aren't doing that. you are adding the same value of the first selected item for as many rows that there are total.
3) The for next loop is declared as 'to listview1.count - 1' inorder to add up all the selecteditems, you need to change that to 'to listview1.selecteditems.count - 1'.
4) where's the word 'next' at the end of the loop
Dim Tot as integer = 0
For i as integer = 0 to listview1.selecteditems.count -1
Tot += cint(me.listview1.selecteditems(i).subitem(1).text)
Next
me.label1.text = Tot
Hope this helps...
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
hello
Dim Tot as integer = 0
For i as integer = 0 to listview1.selecteditems.count -1
Tot += cint(me.listview1.selecteditems(i).subitem(1).text)
Next
me.label1.text = Tot
The code u suggested just gives me the one by one value of items present in listview
eg :i placed this code on listview double click event so it just give me value 1 when i double click on selected row and then 2 and goes on.
but i want the total of the items present in row and display it in label
for eg:suppose there are two listviews both are having columns as Rupees but the first one is having Rs in it like(100,200,300 etc..)
what i want is when i double click on any of row of first listview it adds the items preset in the selected row one by one and displays it in label
like (100+200+300) which gives result as 600 in label
simply saying i want total of text present in the listview
so please suggest if some have any idea.
Thank You.
|
|
|
|
|
I am trying to import csv files that have comma embedded within quotes. After trying to figure the regex pattern I ended up nowhere. Using Jet drivers is the last option I could go for. Could anyone provide some help on how to do this kind of importing.
Thanks in Advance.
|
|
|
|
|
This might help - it's taken from Mastering Regular Expressions (2nd ed.) by Jeff Friedl (O'Reilly, 2002).
You need to use the RegexOptions.IgnorePatterWhitespace or edit it to leave only the RE bits.
dim regStr a s String = _
"\G(?:^|,) " & _
"(?: " & _
" (?# Either a double-quoted field... ) " & _
" "" (?# field's opening quote ) " & _
" (?<QuotedField> (?> [^""]+ | """" )* ) " & _
" "" (?# field's closing quote ) " & _
" (?# ...or... ) " & _
" | " & _
" (?# ...some non-quote/non-comma text... ) " & _
" (?<UnquotedField> [^"",]* ) " & _
" )"
Oh and check for matching parentheses - I think I've got them right but...
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
i am facing this problem , if any body can help..
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) +211
Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) +74
[InvalidCastException: Conversion from string "" to type 'Double' is not valid.]
Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) +218
Microsoft.VisualBasic.CompilerServices.Operators.CompareObject2(Object Left, Object Right, Boolean TextCompare) +2984
Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(Object Left, Object Right, Boolean TextCompare) +25
Rostering.Page_Load(Object sender, EventArgs e) +1716
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Regards
Suresh
|
|
|
|
|
Hi,
without any more information about your app and the inputs you provide, here goes my wild guess of the day:
the most popular way of getting such exception is by parsing the content of an empty textbox; left empty those bastards tend to be just unparsable.
the second most popular cause would probably be a mismatch between your regional settings, the user provided data and your code.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
I’m following a tutorial using serialization/saving records.
I can make records, display them ok in a datgridview and then save them ok using serialization. Then I can reopen the programme and reload the dataset from the deserialised file, and show the records ok in the datagrid view - but I cannot add any more records to the datagridview.
I’d be grateful for any help/advice/assistance.
Regards,
Steve
Here is my code:
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
Public Class Frm_DataEntry
Dim ThePoint As New Point(540, 150)
Public TheRecord As DataRow
Dim ii As Integer
Private Sub Frm_DataEntry_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Location = ThePoint
End Sub
Private Sub Tbx01_FirstName_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Tbx01_FirstName.Enter
Tbx01_FirstName.Clear()
Tbx02_LastName.Clear()
Tbx03_Phone.Clear()
End Sub
Private Sub Btn01_Save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn01_Save.Click
TheRecord = Frm_Mainform.dt_Table.NewRow
TheRecord(Frm_Mainform.dt_Col02_FirstName) = Tbx01_FirstName.Text
TheRecord(Frm_Mainform.dt_Col03_LastName) = Tbx02_LastName.Text
Frm_Mainform.dt_Table.Rows.Add(TheRecord)
Frm01_WithDGV.DGV01.DataSource = Frm_Mainform.ds_Dataset
Frm01_WithDGV.DGV01.DataMember = Frm_Mainform.dt_Table.ToString
Frm01_WithDGV.DGV01_BS_Col01_PKey.DataPropertyName = Frm_Mainform.dt_Col01_PKey.ToString
Frm01_WithDGV.DGV01_BS_Col02_FirstName.DataPropertyName = Frm_Mainform.dt_Col02_FirstName.ToString
Frm01_WithDGV.DGV01_BS_Col03_LastName.DataPropertyName = Frm_Mainform.dt_Col03_LastName.ToString
Dim ii As Integer
ii = Frm_Mainform.dt_Table.Rows.Count
MessageBox.Show(ii)
End Sub
Private Sub Btn02_SaveAndClose_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn02_SaveAndClose.Click
Dim Filename As String = "PermitToWork.pmt"
Dim fStream As FileStream
Frm01_WithDGV.DGV01.DataSource = Frm_Mainform.ds_Dataset
Frm01_WithDGV.DGV01.DataMember = Frm_Mainform.dt_Table.ToString
Frm01_WithDGV.DGV01_BS_Col01_PKey.Width = 90
Frm01_WithDGV.DGV01_BS_Col02_FirstName.Width = 125
Frm01_WithDGV.DGV01_BS_Col03_LastName.Width = 125
Frm01_WithDGV.DGV01_BS_Col04_Date.Width = 125
Frm01_WithDGV.DGV01_BS_Col01_PKey.DataPropertyName = Frm_Mainform.dt_Col01_PKey.ToString
Frm01_WithDGV.DGV01_BS_Col02_FirstName.DataPropertyName = Frm_Mainform.dt_Col02_FirstName.ToString
Frm01_WithDGV.DGV01_BS_Col03_LastName.DataPropertyName = Frm_Mainform.dt_Col03_LastName.ToString
If File.Exists(Filename) Then
Try
fStream = New FileStream(Filename, FileMode.Create)
Dim binFormat As New BinaryFormatter
binFormat.Serialize(fStream, Frm_Mainform.ds_Dataset)
Catch anex As ArgumentNullException
MsgBox("The inventory could not be accessed")
Catch ex As SerializationException
MsgBox("The application failed to retrieve the inventory")
Finally
fStream.Close()
End Try
Else
Return
End If
Frm_Mainform.Close()
End Sub
Private Sub Btn03_Reload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn03_Reload.Click
Dim Filename As String = "PermitToWork.pmt"
Dim fStream As FileStream
If File.Exists(Filename) Then
Try
fStream = New FileStream(Filename, FileMode.OpenOrCreate, FileAccess.ReadWrite)
Dim binFormat As New BinaryFormatter
Frm_Mainform.ds_Dataset = binFormat.Deserialize(fStream)
Frm01_WithDGV.DGV01.DataSource = Frm_Mainform.ds_Dataset
Frm01_WithDGV.DGV01.DataMember = Frm_Mainform.dt_Table.ToString
Frm01_WithDGV.DGV01_BS_Col01_PKey.Width = 90
Frm01_WithDGV.DGV01_BS_Col02_FirstName.Width = 125
Frm01_WithDGV.DGV01_BS_Col03_LastName.Width = 125
Frm01_WithDGV.DGV01_BS_Col04_Date.Width = 125
Frm01_WithDGV.DGV01_BS_Col01_PKey.DataPropertyName = Frm_Mainform.dt_Col01_PKey.ToString
Frm01_WithDGV.DGV01_BS_Col02_FirstName.DataPropertyName = Frm_Mainform.dt_Col02_FirstName.ToString
Frm01_WithDGV.DGV01_BS_Col03_LastName.DataPropertyName = Frm_Mainform.dt_Col03_LastName.ToString
Catch anex As ArgumentNullException
MsgBox("The inventory could not be accessed")
Catch ex As SerializationException
MsgBox("The application failed to retrieve the inventory")
Finally
fStream.Close()
End Try
Else
Return
End If
Dim ii As Integer
ii = Frm01_WithDGV.DGV01.Rows.Count
MessageBox.Show(ii)
End Sub
End Class
Thanks for your help and advice!
Steve
|
|
|
|
|
Hello to All.
I'm getting this error
Error 1 Comma, ')', or a valid expression continuation expected.
From this line of code at the Object().
Dim schemaTable As DataTable =_dbConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,_New Object(){Nothing, Nothing, Nothing, "TABLE"})
I'm new to this and in need of help. If you need to see all of the code I can upload it.
Thank you.
AW
|
|
|
|
|
A Wyatt wrote: ,_New Object(){Nothing, Nothing, Nothing, "TABLE"}
This looks like a mess, what do you expect it to do ? If this is valid code in any way, it's an idiom I don't know about, but for sure if you create a new objecgt, the { } syntax is invalid, and probably generally invalid for VB
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: This looks like a mess
Gave you a 5 just for that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|