-
Tips for moving from VB6 to VB.NET [new info added 10-19-05]
i found this article on the MSDN website:
http://msdn.microsoft.com/library/de...ngtodotnet.asp
i thought it might be useful for anyone moving from vb6 to .NET or anyone who wants to learn about the basics of .NET
EDIT: This free book from microsoft also gives assistance for moving from vb6 to .NET
-
Re: Tips for moving from VB6 to VB.NET
I slightly changed the subject of the thread and made this a sticky. We will keep it near the top for a little while to help anyone that is migrating over..
-
Re: Tips for moving from VB6 to VB.NET
I suppose I can contribute to this thread since I am doing a 40,000 line VB6 conversion to .NET. I (highly) recommend biting the bullet and just doing a rewrite. There have been some good things about converting (like not having to rewrite some code), but in the long run...my feeling is that a full rewrite would have been better.
-
Re: Tips for moving from VB6 to VB.NET
Just wanted to mention dan appleman has a great book on moving from vb6 to vb.net.
You can search for authors via amazon and his book should come up.
-
Re: Tips for moving from VB6 to VB.NET
One tip I suggest is...
.NET allows use to use old VB6 code in .NET by using the Microsoft.VisualBasic import declaration...
I suggest that you use true "VB code" using the frameworks VB syntx.
What I mean is... use the .NET framework's visual basic commands and not the VB6 commands. Convert all your VB6 code to true .NET framework code.
It will save you headaches in the future.
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by epixelman
One tip I suggest is...
.NET allows use to use old VB6 code in .NET by using the Microsoft.VisualBasic import declaration...
I suggest that you use true "VB code" using the frameworks VB syntx.
What I mean is... use the .NET framework's visual basic commands and not the VB6 commands. Convert all your VB6 code to true .NET framework code.
It will save you headaches in the future.
which means remove the Microsoft.VisualBasic import that a new VB app automatically adds for you in the IDE
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by tr333
I think it was you who recently posted a link to SharpDevelop. As I currently can't afford the bucks or euros to go for .net I thought your suggestion was an interesting one. Now my question is, is the language syntax of .net the same as that of SharpDevelop, or will I have to start from scratch whenever I get .net even if I have acquired a basic yet fairly acceptable knowledge of SD?
-
Re: Tips for moving from VB6 to VB.NET
You know you can get the basic version of VB.NET 2003 for 100 bucks (US)
http://msdn.microsoft.com/howtobuy/vbasic/default.aspx
also you can download the .net 2005 beta for free and use that until you have a good grasp of the language and then upgrade to a pay version of 2005 (which would be out by then)
-
Re: Tips for moving from VB6 to VB.NET
SharpDevelop is just another IDE for developing software in .NET, like visual studio. so there would be no differences to the actual code/syntax.
you could even code in notepad if you were feeling really hardcore...
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by tr333
you could even code in notepad if you were feeling really hardcore...
ahhh just like my HTML :bigyello:
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by tr333
SharpDevelop is just another IDE for developing software in .NET, like visual studio. so there would be no differences to the actual code/syntax.
you could even code in notepad if you were feeling really hardcore...
Great. Now, what are the features I am exactly missing from .net? I mean, going from VB6 to SharpDevelop, would that be a step down?
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by krtxmrtz
Great. Now, what are the features I am exactly missing from .net? I mean, going from VB6 to SharpDevelop, would that be a step down?
from an IDE perspective possibly since the Microsoft IDE is by far the best....(of course this is my opinion)
but from a programming standpoint NO its not, because you would be creating .net apps and not vb6 apps
-
Re: Tips for moving from VB6 to VB.NET
Understand OOP!!!!!
http://www.codeproject.com/useritems/OOPS_In_VBNET.asp
ALWAYS USE:
Option Strict On ' Requires Explicit Type Conversions eg. CType, DirectCast, ect.
Option Explicit On ' Requires Explicit Typing, Dim x as String, NEVER leave this off...
Comment Your Code
-
Re: Tips for moving from VB6 to VB.NET
I tried SharpDevelop and found it lacking quite a few features.
It does use the .net framework syntx... so going from SD to .NET codewise won't be a problem.
But SD has no debugger.
Doesn't handle OCX or 3rd party .NET controls very well.
Doesn't do mobile very well
and no ASP controls or window forms.
Is only on version 1.0.3.
Although it is a good start for beginners.... if you are serious about using .NET, then get VS 2003 or 2005 (when it comes out)
If you are a student, you can get Academic for under a $100...
-
Re: Tips for moving from VB6 to VB.NET
I haven't really played with #Develop but
and no ASP controls or window forms.
The Windows forms controls are in the .Net Framework System.Windows.Forms
The asp.net controls are in the .Net Framework System.Web.UI
Is only on version 1.0.3.
There have only been two versions of Visual Studio .Net (and this does not much meaning anyway)
-
Re: Tips for moving from VB6 to VB.NET
<ABX...
Although the ASP is in the framework... SD (SharpeDevelop) has not implemented them to use on the WinForms.... meaning that when you put code on the form it doesn't automatically write the needed code. They only have auto code creation for C# and VB.
VS may be on it's second version, but is way..way far more advanced.
SD is missing alot of functions. Not to mention that is is unstable.
mendhak said it best concerning SD...
"Pro's... it's free....... Con's.... it's free."
You get what you pay for with SD. (oh which is nothing)
.
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by epixelman
<ABX...
Although the ASP is in the framework... SD (SharpeDevelop) has not implemented them to use on the WinForms.... meaning that when you put code on the form it doesn't automatically write the needed code. They only have auto code creation for C# and VB.
VS may be on it's second version, but is way..way far more advanced.
SD is missing alot of functions. Not to mention that is is unstable.
mendhak said it best concerning SD...
"Pro's... it's free....... Con's.... it's free."
You get what you pay for with SD. (oh which is nothing)
.
Just because it isnt automatically done for you doesnt mean it doesnt work. you should be able to copy and paste the code from an form created in visual studio .Net and it should look the same.
-
Re: Tips for moving from VB6 to VB.NET
Can you run both Visual Studio.Net and VB.net 2005 (Beta) on the same machine without any problems. I'm thinking about doing more with VB.Net but don't want to break my present version while trying the Beta.
Thanks,
Michael
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by Rev. Michael L. Burns
Can you run both Visual Studio.Net and VB.net 2005 (Beta) on the same machine without any problems. I'm thinking about doing more with VB.Net but don't want to break my present version while trying the Beta.
Thanks,
Michael
Yes, you can install all different versions along side eachother, which includes VB6, VB.NET 2002, 2003, and 2005 beta
-
Re: Tips for moving from VB6 to VB.NET
I dont recommend installing a beta version along side of another production version since M$ is famous for making the
beta versions not upgradeable nor uninstallable.
If you have a test system available (one that you can reformat) I would highly suggest that you install the
beta version on it instead, unless you dont mind having to reformat your production system in order to perform
an upgrade. ;)
-
Re: Tips for moving from VB6 to VB.NET
Rob, did you actually experience a problem uninstalling the beta 05? I have not tried to, but I don't see why it would be a problem. Both the 2.0 beta framework, and the 2005 beta IDE are listed in the add/remove program list. And I don't see why there should be any issues. 2005 is really just enhancements to the IDE and framework, which means the basic concepts for installing/uninstalling stem from 2003 (which in turn came from 2002) I would hope the install/uninstall should be pretty standard by now...
-
Re: Tips for moving from VB6 to VB.NET
I had read that the 2002 and 2003 had these issues when they were in beta. I havent taken too much of a
look into the 2005 but I am just waiting for a RTM release before I install on my production system along side of
VB6 and 2003.
Has anyone tried uninstalling 2005 beta yet?
-
Re: Tips for moving from VB6 to VB.NET
IS .NET the new version of VB6 ya, or is it design for different application mainly networking?
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by chris lynch
IS .NET the new version of VB6 ya, or is it design for different application mainly networking?
I would say that VB.Net is based on VB6, there are quite a few difference.
Networking has been completely restructured... No More Winsock control, you need to Use the System.Net.Sockets Classes. More complex but much more powerful.
-
Re: Tips for moving from VB6 to VB.NET
I think what chris meant was is the ".NET" in VB.NET because it is designed for networking, etc...
the .NET actually I think is more based on the concept of having a framework to run managed code versus having much to do with the internet or networking. Yes VB.NET can interact with the internet and networks worlds better than VB6, but it does just about everything worlds better than VB6
-
Re: Tips for moving from VB6 to VB.NET
SharpDevelop is a pile of cack imho. Buggy, ugly and VERY VERY slow to load and takes up scandalous resources. VS is 100 times better
-
Re: Tips for moving from VB6 to VB.NET
Im gettimg the feeling you can't use both VB and VB.Net :( installed on the same disk/machine/pc.
I want to keep coding in VB6 but want to dabble with VB.Net to check it out. Will probably use VS .Net 2003. So what will stuff up first and what is the work around? :D
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by PALAEOLOGOS
Im gettimg the feeling you can't use both VB and VB.Net :( installed on the same disk/machine/pc.
I want to keep coding in VB6 but want to dabble with VB.Net to check it out. Will probably use VS .Net 2003. So what will stuff up first and what is the work around? :D
What workaround? VB6 and VB.Net Get along fine.
-
Re: Tips for moving from VB6 to VB.NET
Are you sure man? I have the disks and Im about to install on your advice..... I remember something to do with global OS environment variables and compilation and execution problems.......
If you are wrong I'm sending you the grumpiest smiley I can find. ;)
-
Re: Tips for moving from VB6 to VB.NET
The only time there was any problems with VB6 and VS.NET on the same machine was when VS2000 was still in beta. Since it's gone gold, it hasn't been an issue. We've got VB6 and VS.NET 2003 here on everyone's machines and narry a problem. I do knwo that it's recommended that VB6 be installed FIRST, then .NET installed second.
Tg
-
Re: Tips for moving from VB6 to VB.NET
yeah I also have not had a problem on any of the several machines I have IDEs installed on. On one machine I have VB6, 2002, 2003, and 2005 beta
-
Re: Tips for moving from VB6 to VB.NET
k.
Just pressed install. Be back to tell you how it goes :D
-
Re: Tips for moving from VB6 to VB.NET
I'm sure it will be fine. I felt the same when I first did a side-by-side install of VS6 and VS.NET 2003.
I have not had one issue yet after almost a year. :thumb:
-
Re: Tips for moving from VB6 to VB.NET
No longer a .Net virgin I feel my inocense has been stripped away.
Looks very good! I compiled and packaged some of my VB6 Apps to check what would happen and all is ok. I can't seem to find the Deployment Wizard for VB.Net does it have one?
-
1 Attachment(s)
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by PALAEOLOGOS
No longer a .Net virgin I feel my inocense has been stripped away.
Looks very good! I compiled and packaged some of my VB6 Apps to check what would happen and all is ok. I can't seem to find the Deployment Wizard for VB.Net does it have one?
Setup wizard is now a project.
So you may find it in the new Projet windows
-
Re: Tips for moving from VB6 to VB.NET
See this thread for more info on .NET Setup.
Also, in the Application Forums FAQ there are a couple of articles on deploying a .NET app. ;)
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by RobDog888
Has anyone tried uninstalling 2005 beta yet?
I did actually. I uninstalled the .NET 2.0 beta framework and the IDE completely
Working fine :D I even installed the .NET 1.1 framework and VS.NET 2003 after that so I would say it works well.
I think this is only in the beta of 2005 but I couldn't compile right :confused: It never produced a .exe and there was always this weird installation thing that I didnt like.
-
Re: Tips for moving from VB6 to VB.NET
I'm working on a program that I was originally doing in VB editor because I wanted to get a start on it while I waited for my VB2003.Net to come. I would like to somehow transfer this work from editor to .Net. Is there a way to do this? I have Window2000 Professional if that helps to understand what kind of editor I was using. I appreciate the help! Thanks!
-
Re: Tips for moving from VB6 to VB.NET
it doesn't explain at all what editor you were using. What was the editors name?
-
Re: Tips for moving from VB6 to VB.NET
I'm using the excel VB editor. sorry
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by Liadan23
I'm working on a program that I was originally doing in VB editor because I wanted to get a start on it while I waited for my VB2003.Net to come. I would like to somehow transfer this work from editor to .Net. Is there a way to do this? I have Window2000 Professional if that helps to understand what kind of editor I was using. I appreciate the help! Thanks!
same problem here...
i dunt want to write that code again...is there any way...
also Caption = "Form1"
ClientHeight = 4650
ClientLeft = 60
ClientTop = 345
ClientWidth = 6390
LinkTopic = "Form1"
ScaleHeight = 4650
ScaleWidth = 6390
StartUpPosition = 3
also when i began re-writing th eabove code written in excel's visual basic editor i cud not locate client Height etc in the .net platform. somebody help
asap.
thanks
-
Re: Tips for moving from VB6 to VB.NET
excel is VBA, which is like a consolidated version of VB6. You will find many differences between VBA and VB.NET
-
Re: Tips for moving from VB6 to VB.NET
hmmm.....alright. I guess I'll just re-write the program in .Net. Thanks.
-
Re: Tips for moving from VB6 to VB.NET
Quote:
Originally Posted by epixelman
One tip I suggest is...
.NET allows use to use old VB6 code in .NET by using the Microsoft.VisualBasic import declaration...
I suggest that you use true "VB code" using the frameworks VB syntx.
What I mean is... use the .NET framework's visual basic commands and not the VB6 commands. Convert all your VB6 code to true .NET framework code.
It will save you headaches in the future.
One thing that I have found out the hard-way is that you need to have admin rights / power user rights for the import statements to work. Also for the migration to work. That wasn't the case with VB6 earlier.
-
Re: Tips for moving from VB6 to VB.NET
Also, do not listen to people who tell you that migrating is a better option than re-writing. A complete rewrite is much cleaner compared to migrating and will save you a whole deal of time.
-
Re: Tips for moving from VB6 to VB.NET
Yea I think you're probably right. It actually wasn't that bad to just re-write. I had to re-do my form and everything, but then I just copied and pasted my code from editor and fixed the parts that .Net had problems with. It didn't take long at all. Thanks for all your suggestions. :)
-
Re: Tips for moving from VB6 to VB.NET
FREE BOOK - Upgrading from VB6 to VB.NET
This may have already been posted here...but here it is.....
Download from http://msdn.microsoft.com/vbrun/stay.../upgradingvb6/
Scroll to the bottom of the page to download the entire book.
-
Visual Basic .Net 2003 Standard??
Hi,
Dunno, if this is the right place or not, but I currently program using VB 6.0 prof and want to go to .Net. I know that VB6.0 requires the prof edition to create distributable apps, but is the same true for VB .net??
The reason I ask is when I do searchs for VB.net, all I can find is the "Standard" edition not a professional one. I see there is a professional edition of the .net "studio", but neither mention the "distributable" aspect.
Any help would be appriciated.....thanks. :)
-
Re: Tips for moving from VB6 to VB.NET
The only version that you can't build redist app with (as far as I know) is the Beta for 2005. I have VB.NET Standard, and I'm able to redist just fine. The difference between Standard, Professional and Enterprise is the amount of tools & bells & whistles you get.
But I could be wrong about that.... it's been know to happen.
Tg
-
Re: Tips for moving from VB6 to VB.NET
Is there any related E-Book for .Net programming for download?
-
Re: Tips for moving from VB6 to VB.NET
dear all,
i am an experienced vb6 programmer and have just finished a wonderful and complex activex in VB6 (that's about right :)).
just found out i need to port it in .NET for various reasons, however i have a very very little experience of .NET. am i correct in assuming that i just SHOULDN'T use the convertion wizard? and go through every function to re-write it?
...
thank you,
wc.
-
Re: Tips for moving from VB6 to VB.NET
It's been the common advise and I would advise it to you also, don't use the Upgrade wizard. It would be better to completely re-write it from ground up... :)
-
Re: Tips for moving from VB6 to VB.NET
damn...
hopefully this won't take too much. i really do not know where to start.
-
Re: Tips for moving from VB6 to VB.NET
MrPolite was Polite enough to find a link to some FREE books Microsoft is offering (they are for download in PDF format) that will help move from VB6 to VB.NET and also help learning .NET 2005
you can find the books Here
-
Re: Tips for moving from VB6 to VB.NET [new info added 10-19-05]
I'm not polite! stop insulting me
just a note, that link has a book for vb2005 too;) if you want to start with that right off
-
Some video show/tutorials you might find interesting
Some video show/tutorials you might find interesting:
My personal favourite: VBTV - too bad MS has stopped webcasting it.
The .NET show - Make sure to check the old archives. They have very good discussion on the framework, CLR, VB.NET etc. (Though the archived videos are old. They are still interesting.)
VB.NET Express Absolute Beginner's Video Series
Check http://www.learnvisualstudio.net/ for some free videos.
VB.NET for Beginners to Programming Workbook and Videos
IDE Proficiency Series for Visual Studio.NET 2003
C# for Beginners to Programming Workbook and Videos
DotNetRocks (audio only)
MSDN Channel 9 (Not very beginner friendly, but still interesting)
MSDN TV (Not very beginner friendly, but still interesting)
-
Re: Tips for moving from VB6 to VB.NET [new info added 10-19-05]
iPrank, a few of those links are already on the other sticky thread - VB.NET hints you might not know [updated 11-04-2005]. You may want to chack it out. But you do have some informative links too. :thumb:
Maybe it would be better for some of the links to go in that thread?
-
Re: Tips for moving from VB6 to VB.NET [new info added 10-19-05]
Quote:
Originally Posted by RobDog888
iPrank, a few of those links are already on the other sticky thread - VB.NET hints you might not know [updated 11-04-2005]. You may want to chack it out. But you do have some informative links too. :thumb:
Maybe it would be better for some of the links to go in that thread?
Sorry. I didn't checked that thread. I'm just starting .NET, thought that thread may be for exprrienced .NET guys. :p
Will you please move/moderate the links. (that thread is closed/locked I guess.)
-
Re: Tips for moving from VB6 to VB.NET [new info added 10-19-05]
Hi,
I would like to ask...VB 6 is structured language right? How about Visual Basic 2005..???...Because I have Visual Studio 2005 and Visual Studio.NET 2003, which both are object oriented language....so, in short, VB 2005 and VB 6 has different coding style...is that correct?
-
Re: Tips for moving from VB6 to VB.NET [new info added 10-19-05]
I thought it would be worthwhile to post a link to the conversion chart I made.
Thread
Visual Basic 6 to .NET Function Equivalents
I hope people find this useful.