Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB 6.0 >>> VB.NET / December 2004

Tip: Looking for answers? Try searching our database.

How do I convert this

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dib - 28 Dec 2004 13:17 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.