Question What can VB.net do that VB6 couldn't?

J Trahair

Well-known member
Joined
May 14, 2008
Messages
175
Location
Spain
Programming Experience
10+
I'm an experienced application developer in VB6, and I finally bit the bullet - I've spent a week learning to use VB.net. But what have I achieved?

What can I now do in VB.net that VB6 couldn't? General ideas please (eg. it boils the kettle and makes the toast), I'm not looking for incomprehensible code segments.

Please tell me it was worth it (apart from the fact that Microsoft have taken millions of VB6-ers and dumped them)!
 
Actualy i'm a vb6 coder also, and i didn't found any diffs, maybe 1 thing, vb.net is compatible with vista. vb6 is not a good friend of vista. :)
 
Console applications

One of the many things you cannot do in VB6 is create Console applications, which I find very useful for teaching beginners the logic and structure of computer programming without the distraction of the GUI.

The Boolean TryParse() method is very useful for converting strings to numbers without the possibility of an error. No need ever to use On Error GoTo statements.

Option Strict On guarantees proper explicit conversions are made and reduces the incidents of hidden errors resulting from implicit conversions.
 
OK, console applications - that's writing to the 'DOS' screen. I award 3 out of 5 points. (This is deliberately light-hearted, but with a serious purpose - what's better about .Net?)
Converting string numbers to values: in VB6 you could do
VB.NET:
sngNumber = Val("43")
. I award 1/5 to .Net because it could have caused an error in VB6.
Option Explicit was available in VB6. I award 1/5 because there are some better Options in .Net.
However, none of this actual boils the kettle, let alone makes the toast. (Although these improvements may guarantee some mild heat applied to the kettle, as opposed to just hoping for the best).
I'm looking for ground-breaking stuff.
Keep them coming, please...!
 
Did you learn everything you can do with VB6 in a week also?

VB.Net has the .Net Framework class library, an extensive code library, which VB6 don't. All the code in this library you don't have to write yourself for each of the tasks that this do. There is a great deal of "single-liners" here that take 100 lines of declarations and coding to do the same with VB6 and Win32 code.

VB.Net is a fully fledged OOP programming language. VB6 is not. Whether you use it actively could be a choice or knowledge issue, but you'll be taking advantage of the default implementations of this in all usage of the language inadvertently.

VB 2003-2005-2008 has an increasingly superior integrated development editor (IDE), far better than the classic VB one. This also includes intellisense, great visual designers and code generators. (no need to compare VB6)
 
RE: Val

The Val function converts strings to a type Double only. TryParse converts a string to any other specified type. Val also has a number of side effects of which you may or may not be aware, so it can convert a value to a number which otherwise should return zero.
 
Val() returns a double. I've had trouble in VB6 with Val("12,345.67") which it returns as 12 (anything after the , is ignored). OK, so I'm still learning VB6 (and of course VB.Net).

However, these suggestions, although good, are merely better ways of doing the same things that VB6 could do, so points awarded are a maximum 3 out of 5!

Apart from the Console thing, what can VB.net do that VB6 can't? Should I have better spent my 'week' lying on the beach?
 
vb.Net runs faster I think
vb.net is vb.7 and now there is vb.8 maybe higher im still kida new to vb
figure vb.net is 2003 all the same stuff from past versions + a few extra fetures
maybe less bugs also
 
VB.Net 2003 = vb7
vb.net 2005 = vb 8
vb.net 2008 = vb 9

Just to clarify
 
There are 3 kinds of people in the world: Those who can count and those who can't.

Windows is a set of 32 bit extensions on a 16 bit shell for an 8 bit OS using a 4 bit kernel made by a 2 bit company that can't stand 1 bit of competition.

I like u sig Brotha
 
I have the same dilemma! I posted this topic a while ago..

http://www.vbdotnetforums.com/showthread.php?t=27985


So you guys are saying VB.Net and VB6 are almost the same except for the .Net framework?

Because I think vb6 and vb.net is almost the same except for that you can create console applications....

No, VB.Net was built from the ground up and uses the .Net framework. This means that the internal workings of vb.net are different than vb6 which means they are essentially two different languages. However, vb.net was made with vb6 programmers in mind, so they share an extremely similar syntax which means vb6 programmers wont have quite as hard of a shift from vb6 to .net.

VB was stepped up quite a bit as a language to meet the standards of today's methodologies and to make use of the .net framework so some of the extremely simple things that can be done in vb6 do require a little more work in vb.net

Also, I do remember making console apps in vb6 a long time ago, it was a pain and they were called something else.
 
The only difference is that I can actually code without installing Visual Studio in . NET, just using notepad and the .NET SDK you can actually create applications but it is really pain in the ass but quite enjoyable and challenging, and I you can actually use different programming languages in one application. Those are the only advantages of .Net from VB6, Which I am aware of and I can only think of.

As of now for me, .NET is like this:

VB = VB.Net

ADODC or Data Control = ADO.Net

ASP = ASP.NET

If you can enlighten me regarding this matter, I would really appreciate it. Thanks in advance.
 
And while weeks of coding now in VB.NET using notepad, I can see lots of similiraties with Java and you actually get benefited with OOP.

but if Junggalo was able to code console VB6, you are actually using OOP - Classes and Methods and etc techniques which VB6 would be quite similar with VB.NET, if you know what I mean...

I know and I feel that there is something relevant with VB.NET, but I haven't encountered it yet because of its similarities with VB6..

I am not really sure if this topic is really dumb for experts with VB.Net but I really need to know this before considering the job that they are offering me.

If I will be getting that job and do not even know the relevance of .NET, definitely my code and application structure in VB.NET would be the same with VB6..

Also, I do not know anything about QBasic. But if you want to talk about PHP or Java you are very much welcome, but I think it is quite appropriate for other people because this is a VB.NET forum.
 
The only difference is that I can actually code without installing Visual Studio in . NET, just using notepad and the .NET SDK you can actually create applications but it is really pain in the ass but quite enjoyable and challenging, and I you can actually use different programming languages in one application. Those are the only advantages of .Net from VB6, Which I am aware of and I can only think of.
You can edit the vb6 code files using any text editor you want too, even notepad.

The multi language thing in .Net is really nice, a number of my projects have some classes that are programmed in C# and the rest are in VB.
As of now for me, .NET is like this:

VB = VB.Net

ADODC or Data Control = ADO.Net

ASP = ASP.NET

If you can enlighten me regarding this matter, I would really appreciate it. Thanks in advance.
That's a good beginners look at things, as you use .Net more and more you'll start to realize that vb is not vb.net, but it wont be so confusing anymore either.

but if Junggalo was able to code console VB6, you are actually using OOP - Classes and Methods and etc techniques which VB6 would be quite similar with VB.NET, if you know what I mean...
It's not a true console project in vb6, but it's similar and it was a command line app (console app)

vb6 isn't an OO language, whereas VB.Net is
 
Back
Top