Hi,
This code is in VB 6 I have converted the code into DOT net 2003.
I need to change this code and some Listbox and combobox.
here is my funvtion code.
If AnyRS.BOF And rs.EOF = True Then Exit Sub
'UPGRADE_WARNING: TypeOf has a new behavior. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1041"'
If TypeOf AnyBox Is System.Windows.Forms.ComboBox Or TypeOf AnyBox Is
System.Windows.Forms.ListBox Then
AnyRS.MoveFirst()
Do Until AnyRS.EOF
If AnyRS.Fields.Count > 1 Then
sRec = AnyRS.Fields(1).Value
nItem = AnyRS.Fields(0).Value
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.AddItem. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.AddItem(sRec)
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.NewIndex. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.ItemData. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.ItemData(AnyBox.NewIndex) = nItem
sRec = ""
nItem = 0
Else
'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1049"'
If Not IsDbNull(AnyRS.Fields(0).Value) Then
sRec = AnyRS.Fields(0).Value
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.AddItem. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.AddItem(sRec)
sRec = ""
End If
End If
AnyRS.MoveNext()
Loop
End If
Thanks
Dib
Mohamoss - 29 Dec 2004 10:07 GMT
hi
Why don't you use the upgrade tool ships with VS 7 to convert your vb6
application to vb.net
Check also this
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvbpj01/ht
ml/gs0601.asp
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC