What would be the futureproof upgrade for Visual Basic 6?

Associate
Joined
26 Feb 2004
Posts
971
Location
China (Qinhuangdao)
The company I work for have used Visual Basic 6 for years, but they are thinking about upgrading to something more up to date, so we can program some in-house software (not web-related) for Windows Vista.

Does Visual Studio 2008 contain the latest version of Visual Basic?

And is there going to be a whole new learning curve to get myself up to speed with the differences between the two?

The in-house software often involves writing software to communicate with PLC's, controller cards and measurement cards.
 
Yes VB does come with VS08 and yes it is a massive learning curve. How does the software currently communicate with the hardware devices atm. That would be my only major concern if you communicate directly you need to check the functions still exist if it's via COM then you will be fine.
 
If you're wanting to futureproof things I would go for C# rather than VB.NET

The difference between VB6 and VB.NET is far greater than between VB.NET and C# so it would make sense to do this rather than go to VB.NET.
C# is more widely used and if any of the core .NET languages gets deprecated it will be VB.NET before C#.
 
Oh god - not liking the sound if this! (But thanks for the advice!)

We currently have a variety of software. Some uses the MSComms control to talk to devices directly attached to a serial port.
Some use VB6 compatible controls supplied with the controller cards
Some use controls written for us by 3rd parties, written in C++, which we use to communicate to certain PLC's.

I've never learned C as VB6 was so easy to learn. I've a feeling this will become a big headache - maybe better to just stick with VB6 and try to get things to work in Windows Vista?

Or spend the time teaching myself C# - is this included in the VS2008 package?
 
I've never learned C as VB6 was so easy to learn. I've a feeling this will become a big headache - maybe better to just stick with VB6 and try to get things to work in Windows Vista?

Or spend the time teaching myself C# - is this included in the VS2008 package?

Don't stick with VB6; it's a horribly outdated language that has no real use any more. Also, C is nothing like C# or VB.NET.

VB.NET and C# are very similar in that they have (practically) all of the same language features and use the same runtime and standard library. The main differences between them are syntactic (though C# has some features that VB.NET doesn't and vice versa).

It may be easier for your company to move over to VB.NET if you all have prior experience with VB6, but on the other hand it might be a good opportunity to move to C#, which is Microsoft's current flagship language. As Haircut says, the differences between VB6 and VB.NET are far greater than the differences between VB.NET and C# – VB.NET and C# are truly modern, object oriented languages with a plethora of nice features; the differences between them are largely superficial. I'd always recommend C# above VB.NET simply because it's more widely used and in my opinion is a better designed language (isn't there just to cater for transitioning VB6 developers).

And yes, both C# and VB.NET are included with VS2008
 
Last edited:
To OP.

You're going to have a few headaches with VB6 in Vista because of a few compatibility issues, however I can offer the following advice (from someone who was/is in a similar position as yourself and programming PLC's/CNC's).

Stick with what you know. I personally started a thread a few months ago about the age old argument between VB and C# and those who were adult enough to enter a good discussion and who BOTH used VB.Net and C# we all agreed that if you're starting out in programming, best to go with C# but in todays busy busy work environment where you don't have time to go out and learn new languages (times is money!!) there really is no difference between Vb.Net and C# - BOTH are as good as each other. VB.Net will teach you a few bad programming habits, but you've already got those with VB6 so AGAIN, having to learn a new syntax, new methodologies AND do your day to day work is going to cost your company money.

The migration from VB6 to VB.Net really isn't THAT much of an issue. All the logic will remain the same (Loops, clauses, conditions, events, etc), but there's a hell of a lot of library routines that are readily available to you now and the OOP is far far better than VB6 could handle.

If you're programming PLC's and/or CNC's, then you'll probably do away with the MSCOMM control and use the IO library directly. The intellisense within the IDE is second to none and I can pretty much guarantee you'll be able to write your own com-handler within a week in VB.Net that will be able to handle anything you can throw at it.

Another option to look at is the Microsoft Robotic Studio which has some incredibly easy to use logic control systems that will output to a lot of PLC/CNC systems. Creating your own driver is easy and this has gone from a 'technology' to a full 'product' on Microsofts shelf. Totally free and there's a lot of industrial companies that are now writing drivers that are MRS compatible so that should be a good kickboard to help you going.

C# is nothing like C or C++, it's more like Java, but again, don't fall into the trap that you MUST learn C# because you really really don't. Move onwards to VB.Net2008, and you'll be fine.
 
The migration from VB6 to VB.Net really isn't THAT much of an issue. All the logic will remain the same (Loops, clauses, conditions, events, etc), but there's a hell of a lot of library routines that are readily available to you now and the OOP is far far better than VB6 could handle.

If you're programming PLC's and/or CNC's, then you'll probably do away with the MSCOMM control and use the IO library directly. The intellisense within the IDE is second to none and I can pretty much guarantee you'll be able to write your own com-handler within a week in VB.Net that will be able to handle anything you can throw at it.

Sorry I disagree with this. The move from VB6 to VB.Net is pretty much just as big a jump as VB6 to C#. Moving to .Net is about learning the framework and things like the .net OO model. Learning a language isn't just merely learning the syntax, which is fundamentally the only difference between vb and c#, after a week on C# you are familiar with the logic and control constructs of c# and reap the rewards of a more widely used language and additional minor features.
 
Sorry I disagree with this. The move from VB6 to VB.Net is pretty much just as big a jump as VB6 to C#. Moving to .Net is about learning the framework and things like the .net OO model. Learning a language isn't just merely learning the syntax, which is fundamentally the only difference between vb and c#, after a week on C# you are familiar with the logic and control constructs of c# and reap the rewards of a more widely used language and additional minor features.

If the OP knows about dragging and dropping controls onto a form, double clicking said controls and adding code in there to fire an event or enter a routine that goes on to do other things, then half of their job is complete.

Yes I agree the .Net Framework is absolutely huge and offers a massive amount of functionality which was never 'easily' available before, and one immediate thing that springs to mind is the String.Left command which is replaced with Substring so there are a few new methods of using the commands. (Although you can use Microsoft.VisualBasic.Left still)

But as a whole, if the OP is familar with VB6, then the backbone structure of the language, it's commands, how it operates will easily be carried over to VB.Net.

You could quite easily carry on coding in a VB6 fashion, you just wouldn't be getting full benefit.

Afterall, how many VB6 programs are there out in the wild which are easily converted using the conversion wizard in VB.Net. Again, I reiterate, they perhaps don't use the framework to the full potential, but the OP can quite happily move their coding fashion from one to the other with little issues and as time goes on, increase their knowledge and streamline their code to the .Net Framework.
 
If the OP knows about dragging and dropping controls onto a form, double clicking said controls and adding code in there to fire an event or enter a routine that goes on to do other things, then half of their job is complete.

Yes I agree the .Net Framework is absolutely huge and offers a massive amount of functionality which was never 'easily' available before, and one immediate thing that springs to mind is the String.Left command which is replaced with Substring so there are a few new methods of using the commands. (Although you can use Microsoft.VisualBasic.Left still)

But as a whole, if the OP is familar with VB6, then the backbone structure of the language, it's commands, how it operates will easily be carried over to VB.Net.

Absolutely, however all of which are exactly the same for C#, my point is merely that just because he is familiar with vb syntax he shouldn't disregard c#, because he will become familiar with the syntax in a matter of days.

It also means in future the uptake of new languages using c derived syntax will be less daunting, c++, java, php etc.

I was a migrator from VB6, and based on reasons I've mentioned got stuck into C# instead of VB and am grateful that I did.
 
Back
Top Bottom