Maybe that because there is already items in the combo, so Try to add the value you want to the combo first
ComboBox.Items.Add(ds.tables(0).rows(0).item(0))
ComboBox.Text = ds.tables(0).rows(0).item(0)
hth
Maybe that because there is already items in the combo, so Try to add the value you want to the combo first
ComboBox.Items.Add(ds.tables(0).rows(0).item(0))
ComboBox.Text = ds.tables(0).rows(0).item(0)
hth
You are Welcome Comatose :)
Just to give the man who create this code his credit, this is the site
http://discuss.itacumens.com/index.php?topic=23551.0
Thank you all for your response.
I had found t hi s code which is very short 3 lines if you remove the first 3 lines which are for explanatory purpose
Dim SearchFor, SearchIn As String
SearchIn = "She sells sea shells on the sea shore"
SearchFor = "sea"
Dim rex As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(SearchFor)
Dim count As Integer = rex.Matches(SearchIn).Count
MessageBox.Show(SearchFor & " occurs " & count & " times")
Hi all,
Is there a function in vb.net to get how many times string1 is exist in string2?
I had search google and all I found is long code such as this one ( i did not test it) http://www.freevbcode.com/ShowCode.Asp?ID=1025
Is there better way?
FirmTableAdapter1.Update(ds) ' This List what I was Looking for
Problem Solved
Samir Ibrahim
Dim dr As DataRow
Dim dt As DataTable
Dim ds As DataSet
ds = DataSet2
dt = ds.Tables("firm")
dr = dt.NewRow()
dr.Item("f_num") = 9999
dr.Item("f_name") = "samir" 'txt_FarmName.Text
dr.Item("f_floor") = 10 'Val(txt_FloorCnt.Text)
dr.Item("f_type") = "C" ' Left (com_CusType.Text, 1)
ds.Tables("firm").Rows.Add(dr)
as I am reading from an example? there is a line da.Update(ds, "Firm")
Where Is the DataAdapter in my case?
I am using this example from here http://www.homeandlearn.co.uk/NET/nets12p10.html
TIA
Samir Ibrahim
Hi
i am foxpro programmer, and I have good knowledge about vb6 and I am learning vb.net
I have vb6 application, I am trying to convert it to vb.net. searching google, and ask in the forum when I get stuck.
check this site http://www.java2s.com/Tutorial/VB/CatalogVB.htm
hth
Samir Ibrahim
Dim swFile As System.IO.StreamWriter
swFile = System.IO.File.CreateText("c:\myfile.txt")
swFile.Write("MyText")
swFile.Close()
Dim srFile As System.IO.StreamReader
Dim sTextRead As String
srFile = System.IO.File.OpenText("c:\myfile.txt")
sTextRead = srFile.Read()
Debug.Print(sTextRead)
srFile.Close()
This is not exactly what you want, but it will give you an idea.
ps: if someone see's that there is better code or my code is not correct or lack please point to it because I am still learning :)
hth
Samir Ibrahim
Dim iAge, iWeight As Integer
iAge = Val(TextBox1.Text)
iWeight = ((iAge - 1) * 3) + 11
hth
Samir Ibrahim
Hi,
Is there a way to comment multiple line of code in vb.net at once? means not inserting ' in front of each line in case i want to comment 20 lines that will be tedious job?
TIA
Samir Ibrahim
No problem...
what did you meant?
I meant some forums have a Star style or rating style to point out that this reply was helpful, and i want to tell that your reply was helpful to me and solve my problem. is this option available here ?
Hi again Dnx :)
Thanks for the second reply which solve the problem.
Is there is link for giving rate to this message or this message was helpful check?
Thank you.
Samir Ibrahim
Hi Dnx
I had tried that, and I tried to change the backcolor in the Enter Event Me.BackColor = Color.White
It didn't work either.
Does it work at your side?
Regards
Samir Ibrahim
Hi all,
I new to vb.net, and I have alot of questions. so Get Ready :)
I had added a forum and set the IsMdiContainer to True and I noticed that the backcolor has changed to darkgrey
Is there a way to change back the backcolor to normal?
TIA
Samir Ibrahim