converting problem from VB6 to B NET 2005..
I have this code;
VB Code:
Private Sub List1_DoubleClick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles List1.DoubleClick Dim fileName As String If List1.Items.Count > 0 Then 'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' fileName = Dir(My.Application.Info.DirectoryPath & "\words\" & VB6.GetItemString(List1, List1.SelectedIndex) & "\") List2.Items.Clear() Do If fileName = "" Then Exit Do Else List2.Items.Insert(List2.Items.Count, fileName) 'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' fileName = Dir() End If Loop Randomize() List2.SelectedIndex = Rnd() * (List2.Items.Count - 1) Text1.Text = VB6.GetItemString(List2, List2.SelectedIndex) List2.Items.RemoveAt((List2.SelectedIndex)) End If End Sub
and I got this message as it seen here :
'UPGRADE_WARNING: Dir has a new behavior
I dont know how to fix this problem but:
I have a txt file and two words each sentence , and the program should display one word from a sentence randomly in a textbox and the user has two write the answer and if it good he will get a point in a labeltext if not a point in no good labeltext. suppose to be very simple but in VB 6 I have done it very good and now in NET 2005 have some problem can anyone can help me in such a code made in VB NET 2005 another thing that it should be in the code the whole the words from the txt file should be load into a list box at form load and after an answer made by the user , the word deleted from the listbox and the user can see the ramaining words in it.
please help me with this code or just give me a start of code that I could get the first value of a text and second one and random them ..
I want to make my dictation program as I already made by VB6
thanks in advance...




Reply With Quote