PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
vb6-vb2005 conversion
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
vb6-vb2005 conversion
![]() |
vb6-vb2005 conversion |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Has anyone any experience of the conversion wizard for VB6 to VB2005?
if so how good is it? also how does it handle database related conversions i.e is ADO converted to ADO.NET etc. the project is approx 60 forms with so approx 180 to 240 classes The back end was and remains S!L Server 2000 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
I used the conversion wizard on a smaller project that what you have listed
15-20 forms and maybe 2 dozen classes. The upgrade was a slow and painful process. It takes alot of patience and mental toughness ;-) I don't know that I would rely on the wizard handling your ado connections, recordsets, etc... It's something you may have to go through after the upgrade. I've only done this once, and we were using DAO. Good luck . "guy" <guy@discussions.microsoft.com> wrote in message news:C9523F5B-8713-478E-8997-5AB4011E2B87@microsoft.com... > Has anyone any experience of the conversion wizard for VB6 to VB2005? > if so how good is it? > also how does it handle database related conversions i.e is ADO converted to > ADO.NET etc. > > the project is approx 60 forms with so approx 180 to 240 classes > > The back end was and remains S!L Server 2000 > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
I'd leave it in VB6. The conversion wizard is great for short code
segments, but not for complete applications. Mike Ober. "guy" <guy@discussions.microsoft.com> wrote in message news:C9523F5B-8713-478E-8997-5AB4011E2B87@microsoft.com... > Has anyone any experience of the conversion wizard for VB6 to VB2005? > if so how good is it? > also how does it handle database related conversions i.e is ADO converted to > ADO.NET etc. > > the project is approx 60 forms with so approx 180 to 240 classes > > The back end was and remains S!L Server 2000 > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
"guy" <guy@discussions.microsoft.com> schrieb
> Has anyone any experience of the conversion wizard for VB6 to > VB2005? if so how good is it? It's quite ok but has some (unconfirmed) bugs in some special situations: http://lab.msdn.microsoft.com/produ...85-349d5b0a2e58 > also how does it handle database related conversions i.e is ADO > converted to ADO.NET etc. No, it doesn't rewrite your code. It still uses ADO using COM-Interop (usually not recommended) The amount you will have to rewrite also depends on the quality of your VB6 code. Even though you might get it working in VB 2005 just like it did in VB6, you will probably consider redesigning the whole project. To which extent depends on you (or your boss ;-). To give an overview, I extracted the main messages from the overview of an upgrade report the wizard created: Compile Errors -------------- The ReDim function can no longer change the type of the array All parameters in a Declare statement must be fully qualified Some functions are no longer supported The mouse cursor can not be set to a custom pointer Some PictureBox controls were upgraded to panels Some constants were not upgraded The NewIndex property of a control could not be upgraded Some objects and collections were not upgraded The GoSub...Return and On...GoSub statements are no longer supported The Load statement and the Calendar property are not longer supported Some properties and methods could not be upgraded Some Events are no longer supported Some objects could not be resolved Design Errors ------------- The background picture of a panel will be tiled The ItemData property of a ListBox or ComboBox set at design time could not be upgraded The behavior of the Interval property of the Timer control has changed A control was not upgraded The ScaleMode property is no longer supported Some properties and methods could not be upgraded The only font types supported are OpenType and TrueType Warnings -------- UserControls in the project will need to built before they can be used When Sub Main finishes executing the application will terminate The Treeview Nodes Add method behavior has changed Some parameters to the MsgBox, InputBox and AppActivate functions are no longer supported Some structures may require marshalling if passed in an Win32 API call Some properties, methods and events were upgraded to a different property, method or event with a new behavior The behavior of the DataDiff function has changed Arrays must all have a lower bounds of zero The index of an HScrollBar or VScrollBar control in a control array could not be resolved The lower bounds of a collection has changed Fixed-length strings that are passed to Win32 API calls must fit inside allocated buffer Arrays in User Defined Type must be initialized before use Some events may be raised when the form is initialized Changes to some functions may cause unexpected behavior Null has a new behavior Some properties and methods have a new behavior Some late-bound default property references could not be resolved Miscellaneous ------------- Some members of a structure may need to be initialized before they can be used Well, I got a total of 6093 errors and warnings.... Also have a look at this: http://msdn.microsoft.com/vbasic/pr...or/default.aspx Armin |
|
|
|
#5 |
|
Guest
Posts: n/a
|
LDD, Michael,
Thanks for the feedback, leaving it in VB6 is not an option unfortunately. looks like the Data access problem has gone away though as there is an in house code generator to do it. "Michael D. Ober" wrote: > I'd leave it in VB6. The conversion wizard is great for short code > segments, but not for complete applications. > > Mike Ober. > > "guy" <guy@discussions.microsoft.com> wrote in message > news:C9523F5B-8713-478E-8997-5AB4011E2B87@microsoft.com... > > Has anyone any experience of the conversion wizard for VB6 to VB2005? > > if so how good is it? > > also how does it handle database related conversions i.e is ADO converted > to > > ADO.NET etc. > > > > the project is approx 60 forms with so approx 180 to 240 classes > > > > The back end was and remains S!L Server 2000 > > > > > > > > > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Thanks Armin,
very useful i wasnt aware of code advisor. only 6093 errors and warnings? :-) cheers guy "Armin Zingler" wrote: > "guy" <guy@discussions.microsoft.com> schrieb > > Has anyone any experience of the conversion wizard for VB6 to > > VB2005? if so how good is it? > > It's quite ok but has some (unconfirmed) bugs in some special situations: > http://lab.msdn.microsoft.com/produ...85-349d5b0a2e58 > > > also how does it handle database related conversions i.e is ADO > > converted to ADO.NET etc. > > No, it doesn't rewrite your code. It still uses ADO using COM-Interop > (usually not recommended) > > The amount you will have to rewrite also depends on the quality of your VB6 > code. Even though you might get it working in VB 2005 just like it did in > VB6, you will probably consider redesigning the whole project. To which > extent depends on you (or your boss ;-). > > > To give an overview, I extracted the main messages from the overview of an > upgrade report the wizard created: > > > Compile Errors > -------------- > The ReDim function can no longer change the type of the array > All parameters in a Declare statement must be fully qualified > Some functions are no longer supported > The mouse cursor can not be set to a custom pointer > Some PictureBox controls were upgraded to panels > Some constants were not upgraded > The NewIndex property of a control could not be upgraded > Some objects and collections were not upgraded > The GoSub...Return and On...GoSub statements are no longer supported > The Load statement and the Calendar property are not longer supported > Some properties and methods could not be upgraded > Some Events are no longer supported > Some objects could not be resolved > > > Design Errors > ------------- > The background picture of a panel will be tiled > The ItemData property of a ListBox or ComboBox set at design time could not > be upgraded > The behavior of the Interval property of the Timer control has changed > A control was not upgraded > The ScaleMode property is no longer supported > Some properties and methods could not be upgraded > The only font types supported are OpenType and TrueType > > > Warnings > -------- > UserControls in the project will need to built before they can be used > When Sub Main finishes executing the application will terminate > The Treeview Nodes Add method behavior has changed > Some parameters to the MsgBox, InputBox and AppActivate functions are no > longer supported > Some structures may require marshalling if passed in an Win32 API call > Some properties, methods and events were upgraded to a different property, > method or event with a new behavior > The behavior of the DataDiff function has changed > Arrays must all have a lower bounds of zero > The index of an HScrollBar or VScrollBar control in a control array could > not be resolved > The lower bounds of a collection has changed > Fixed-length strings that are passed to Win32 API calls must fit inside > allocated buffer > Arrays in User Defined Type must be initialized before use > Some events may be raised when the form is initialized > Changes to some functions may cause unexpected behavior > Null has a new behavior > Some properties and methods have a new behavior > Some late-bound default property references could not be resolved > > > Miscellaneous > ------------- > Some members of a structure may need to be initialized before they can be > used > > > Well, I got a total of 6093 errors and warnings.... > > > Also have a look at this: > http://msdn.microsoft.com/vbasic/pr...or/default.aspx > > > > > > Armin > > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
On Wed, 21 Dec 2005 05:56:03 -0800, guy
<guy@discussions.microsoft.com> wrote: >Has anyone any experience of the conversion wizard for VB6 to VB2005? >if so how good is it? >also how does it handle database related conversions i.e is ADO converted to >ADO.NET etc. > >the project is approx 60 forms with so approx 180 to 240 classes > >The back end was and remains S!L Server 2000 > I am in the process of upgrading a 9,000-line usercontrol from VB6 to VB2005. Painful stuff. Lots of GDI API calls that need to be translated to GDI+. The converter simply cannot handle everything properly. Thought about converting it by hand, but that would be an even greater task. In the end I decided to let the upgrade wizard work its magic and then went through the code function by function, fixing conversion bugs, refactoring, etc. In some cases I would comment out entire functions, just to get to 0 errors faster. Once I got it to compile, I could finally start debugging the control, adding the functions I skipped the first time around. I would say that converting the control in this way will probably end up taking around half the time it took to write the original. As another poster wrote, it depends on the quality of your code, but another "problem" is that it is highly likely that you will want to refactor portions of your code to the ".Net Way" (if that is the right way to put it). Regards, Joergen Bech |
|
|
|
#8 |
|
Guest
Posts: n/a
|
On Wed, 21 Dec 2005 05:56:03 -0800, guy
<guy@discussions.microsoft.com> wrote: >Has anyone any experience of the conversion wizard for VB6 to VB2005? >if so how good is it? >also how does it handle database related conversions i.e is ADO converted to >ADO.NET etc. > >the project is approx 60 forms with so approx 180 to 240 classes > >The back end was and remains S!L Server 2000 > Have a look here: http://msdn.microsoft.com/vbasic/de...BNetUpgrade.asp I found the downloads interesting, especially the Assessment Tool. The "Tool" will give you some idea of what's involved with a given VB6 app without actually doing the upgrade. As I understand it, in theory the upgrade is designed to get a VB6 project up and running in NET, quickly, if possible. But from all that I have read on the subject so far, for best performance, one would ultimately want to further refine the upgrade to "pure NET". Gene |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

