By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,279 Members | 2,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,279 IT Pros & Developers. It's quick & easy.

vb6-vb2005 conversion

P: n/a
guy
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
Dec 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
LDD
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" <gu*@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.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

Dec 21 '05 #2

P: 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" <gu*@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.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


Dec 21 '05 #3

P: n/a
"guy" <gu*@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/produc...5-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/pre...r/default.aspx

Armin
Dec 21 '05 #4

P: n/a
guy
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" <gu*@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.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


Dec 21 '05 #5

P: n/a
guy
Thanks Armin,
very useful i wasnt aware of code advisor.
only 6093 errors and warnings? :-)

cheers

guy

"Armin Zingler" wrote:
"guy" <gu*@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/produc...5-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/pre...r/default.aspx

Armin

Dec 21 '05 #6

P: n/a
On Wed, 21 Dec 2005 05:56:03 -0800, guy
<gu*@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

Dec 21 '05 #7

P: n/a
On Wed, 21 Dec 2005 05:56:03 -0800, guy
<gu*@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/def...NetUpgrade.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
Dec 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.