VB6 to .Net How to start

zekeman

Well-known member
Joined
May 23, 2006
Messages
224
Programming Experience
10+
I need to convert a vb6 package to .net and know that I want to purchase a MS product IDE such as VB Studio. Can someone help me
understand if it is VB studio that I need and also what version, and what
other things I should know about?

Thanks
 
I recommend to download the free Visual Basic 2005 Express, grab a beginners book for VB.Net, read and try it out.
http://msdn.microsoft.com/vstudio/express/

About converting VB6 code, it's best done by coding it from scratch as you want it done (and not by the upgrade wizards whimsicality).
VB.Net is too different from VB6 to think you can get it all for free, but not difficult to learn and adjust to if you already 'know something' about programming.
 
Thanks for your help, I will download the express with the framework now.

Looks like the automatic conversion utility is not getting good reviews and

that is going to hurt my bottom line. Is the conversion stuff even worth

looking at? Is the conversion stuff available with the Express version.

Thanks again
 
Yes, there is VB6 conversion included with Express, and I read it is better than the .Net 1 version, but we still hear about and see cases of pure converted garbage.
 
Ok John I really appreciate your help. It's about time I move on to
another forum topic but just want to let you know....

I'm ran the conversion wizard and I'm now looking at errors like:--
----------------------

Normal UPGRADE_WARNING: Fixed-length string size must fit in the buffer. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="3C1E4426-0B80-443E-B943-0627CD55D48B"' C:\Opera_Utah_Net\Opera_Utah\budcode\budmenu\Project1.NET1\budbas.vb 15
-----------------------
And by clicking on the error, the IDE takes me to the code but if I
paste the above URL part into my browser I get some really good
help information about what I need to do to fix the code. Such as
above it tells me to add 1 to the length.

So...it looks like the conversion will at least really help me find the
fix for the problem and that's great help.

I would appreciate any further advise.

Thanks again.
 
there's a lot ov VB6 functionality that is present in .NET, but in a different way. To assist with this and give developers an easy way to migrate code form VB6 to VBN, they created the Microsoft.VisualBasic namespace

as a simple example that we just finished discussing in another thread:

In vb6 we wrote MsgBox("Hello"). Now we write MessageBox.Show("hello")

F2 still gets you the object browser, so you can search for MessageBox and MsgBox and see the differences..
When you feel ready to take the plunge to pure .net code without the Microsoft.VisualBasic assistances (and understand there is no set rule saying you must do so) you can remove the reference to Microsoft.VisualBasic in the project's properties and all the bits of code you wrote that rely on the legacy compatibility provided by this suite, will become compiler errors.. at that time Im sure you can visit here and ask .e.g what the equivalent of CDate or CStr are..


-

In a more general sense, oyu need to be aware that VBN is a fully developed, well engineered language of its own that shares a bit of vb6 syntax and some familair words like Form, Control. As such you might do well to get a good book on it, as youre suddenly dealing with a proper Object Oriented, multithreaded language - there's a few paradigms that are very different to VB6 (like if you wanted to make all the forms in your program have a fade effect when closed, you might use inheritance to do this- VB6 has no scope for this) and its really a modification to the way you think about programming, and its rather hard to explain! :)
 
I really appreciate the help. Thanks for the F2 define.

I am concerned since I don't have much experience with forums as to

how much is too much asking. I will watch and read some more to

find out.

Thanks.
 
there are never any stupid questions.. but questions do get shoved into the wrong categories.

If you have a lot of questions, try to group them together and aim to ask questions that dont require an essay to answer (or accept a google search link as an answer to them :) )

When i started VB, i was like "how do i write a loop? how do i do inline if? how do i write a single code statement spread over 2 lines?"

they were all little things, the kind of things that take too long to google for because noone writes about them :) even as recently as a motnh ago I asked how to write a loop in VB.. not because I couldnt do it at all, but because I was used to a beautifully succinct syntax in c# and java, that i just didnt know how to write in vb, but really needed to.

so feel free to ask away!
 
Back
Top