Roger said:
With some editing, the poster is correct:
Visual Studio .NET is not more efficient than VB6.
You can't make a blanket statement like that about anything. But out of
curiosity, why would you say this? VB 6.0 was NEVER known for its
performance or efficiency. Why do you think that MS made most of their apps
in C not VB?
I can write a VB6 App that is at least twice as fast as .NET.
and 1/10
th the size
This is not a measure of efficiency. The reason VB 6.0 does not requre as
much coding is because it was HDING a lot of cumbersome code in the
background. In some cases, this was helpful (ie. you don't have to worry
about creating an instance of your startup form - VB did it for you). In
many other cases, this is a detrement. What if you wanted to alter the way
VB 6.0 does something that it was HIDING from you? Tough luck, you had to
deal with it.
I'll give you a simple example of this....
If you created a form and placed numerous controls on the form and then at
some point wrote a loop that would iterate over the form's Controls
collection....
The order that the controls would be looked at in the loop would be the
order in which you created them on the form (not their sequential placement
on the form, the sequence was based on what control was CREATED first,
second, third, etc.).
In many cases, developers would use this technique for validating user input
on the form. But it's not very nice if the first control validated is the
6th one down on the form.
In VB 6.0, once the Controls collection is populated, that's it, you can't
alter the sequence of them (unless you delete all the controls and re-create
them or make a control array out of them and re-sequence their Indexes).
In VB.NET all you have to do to change the sequence of the controls is to
look at the line of generated code that adds the controls to the controls
collection (Controls.Add control1, control2, etc.) and re-order the
sequence on that line!
This is but one small example of how, in VB.NET, their may be more code to
deal with, but in return, you get MUCH more control over what is happening
and therefore you can fine tune an application MUCH BETTER than you ever
could before, which results is MUCH BETTER performance.
Also, by having certain general housekeeping functions running in the .NET
Framework, rather than your application (ie. Garbage Collection), your
application doesn't have to have that code in it, which results in more
streamlined programs (the .NET Framework runs in a different thread from the
application you built).
Give .NET a chance. I am a former VB 6.0 / Classic ASP person and I felt
like you did for about 6 months until the "light bulb" went off in my head
and I "got it".
..NET is by leaps and bounds far superior in almost all respects to VB 6.0.
Scott M.