Posted By: The Channel 9 Team | Oct 22nd, 2004 @ 6:40 PM | 81,771 Views | 23 Comments
Amanda Silver is a program manager on the Visual Basic team.

We wondered what VB 6 programmers needed to know about Visual Basic.NET.

We also asked her to tell us the three things that make a great Visual Basic programmer.

In a separate video we just uploaded Amanda talks about VB's lineage (Basic was Microsoft's first product).
Tag: VB.NET
Media Downloads:
Rating:
0
0
leeor
leeor
channel9 4 ever
Ok, Amanda just makes too much sense! Smiley
I've been programming VB since version 3.  When .Net came around and I couldn't show Form2 I just closed Visual Studio and went back to VB6.  It really was frustrating.  If it wasn't for the "Student Evangelist" program, I think I'd still have VB6 laying around.  Now I love VB.Net and I'm really appreciating Object Oriented Programming!  It's too damn cool! Smiley  (Inside I miss WinForms too, ASP.Net really took over)

I would love Amanda to expand on how to really make use of the framework, something she just mentioned.  I remember the days of going through the Win32API definitions trying to make use of all those cool APIs.  I use the Object Browser tool with .Net when I look for those cool features you don't find readily avaialble, but I still find myself bringing some old WIN32APIs into .Net to do things because I really can't find them.  Such things as Windows Handles of Open Processes is what I can think of right now when I needed to automate an external program.  (Heh, reminds me of SendKeys Smiley)

Great interview, really confirmed my views.
Beer28 wrote:
VB is nice for people starting out. I started programming windows on VB5, though I had done programming on other systems before that.

If it weren't for VB, I wouldn't be able to code C/C++ on linux with the intel compiler today. Thanks VB.


That is very insulting. VB6 was a full programming language that can do almost anything C++ can do. The few limitations that it does have can be programmed around.

I can build Win32 and MFC (shudder) applications in VC++ now but yet I find that when I need to write an application for my own consumption I will start VB(6) and it would have been written and debugged in half the time - with better results normally.

VB(6) does not stifle creative freedom which is something lower level languages are very good at, even if you get more freedom to do other things (most of which programmers don't bother with).

VB.net is not very good, it doesn't feel the same. Simple things that worked in VB6 and you would expect to work in its 'big brother' don't work any more. For example = Right() Left() Len(). Not to mention that VB.net has moved from a base of functions over to a base of classes, so for new things now you would never consider typing NetFunction(Thing) you would be doing Thing.NetFunction(). Which although in theory simpler it is not what VB is about it is what C++ is about.

VB6 - Day to day, '5min' programs (these can be more complicated than SOME people's C++ apps).

C# - Stuff? - Too time consuming for quick write-out apps however has advance features such a multi-threading.. so I would use this for 'something' .. ?

VB.net - Compiling Other people's code.

VC++ - When I am learning about memory pointers and the fun and wonder of how to cause a memory leak by mis-typing a single letter. I very very rarely write non-learning applications in VC++. I also rarely set my self on fire..

Java - They make me..

VBScript - When I need it.. More than you might expect.


About the Win32 thing, you know that the average VB6 programmer knows MORE about the Win32 system than those that do C++. I also love to hear the C++ bitching about how lame it is calling an API  directly when they are doing the exact same only via a library call! (or a .Net call)

You learn a great deal about Windows and how things work.

Video: I find it ironic that she uses the Win32 as an example for why VB6 is worse than .net - but once you figure out the pattern I find finding a Win32 call (using the API-List tool) hell of a lot faster than searching though libraries of libraries of libraries of the .Net framework.

Anyway you get more freedom with direct Win32 calls. VB.net only allows you to do what Microsoft wants you to do.
Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...

Manip, I hate to say this, but I could not disagree with you more.

I started programming in GW-BASIC. I worked my way up via QuickBASIC 2.0, QuickBASIC 4.5, Visual Basic 3.0, 4.0 (both 16 and 32-bit editions), 5.0, 6.0, .Net 2002 and now 2003 (and partly 2005). I have worked professionally (i.e. for a job) with VB6 and VB.NET.

I think VB.NET is the greatest thing to happen to VB ever. Making VB truly object oriented was utter genious. I find that using the Object Oriented paradigm I can do what I need to do much faster and more reliably than in VB6. I haven't used VB6 anymore for years now, and I say good riddance.

For one thing you mention that certain things don't work anymore (Left() etc.) but that's simply not true. Those things all still work. I can still do Trim(somestring) or go the .Net way and do somestring.Trim(). I can do MsgBox("hello") or MessageBox.Show("hello"). I can do Val(somestring) or Convert.ToInt32(somestring). I can do vbCrLf or ControlChars.CrLf. All those global functions that VB6 used are still there, in the Microsoft.VisualBasic assembly.

You say Thing.NetFunction() is the C++ way. It's not. The people who invented C++ did not invent OO.

Thing.NetFunction() is the OO way of doing things, and Object Orientation is simply a better way of doing things. If NetFunction is an operation on Thing's class, it makes more sense to have it as a member than as a global function.

And you can still call Win32 functions in VB.NET. In fact, the new Declare syntax is richer, and with <DllImport> you have even more control over what happens. With the Marshal class you can manipulate pointers and handles and all kinds of things in ways that are near impossible to do in VB6.

And many, many more things that took serious API hacking in VB6 are just plain possible in VB.NET. For instance overriding a forms WindowProc, which in VB6 isn't possible without some really wacky stuff, and in VB.NET takes overriding the base classes WndProc.
What if you want to extend an existing control in VB6? It leads to unnatural solutions because VB6 has no inheritance.

To make a list like yours:
VB.NET: Whenever I do anything where I have the freedom of choosing the environment myself, it's always VB.NET. Whether its a quick 10 line program I need or a large multi-component application.

C#: I only use it to do really wacky InterOp stuff. Marshal is nice, but not very readable, so in some cases I prefer unsafe code. In this case 99% of the time the C# code will be in an assembly that I call from VB.NET.

Managed C++: Only when Declaring all the functions and structs I need for InterOp becomes more work than the rest of the program. Also called from VB.NET code.

C++: I used to use it quite extensively, but nowadays I only use it when the make me at Uni and for non-Windows development. I still think, from a language design perspective, this is the most interesting language I know.

Java: use it sometimes, but not real often.

VBScript: can't remember the last time I used it.

JScript: client-side HTML scripts.

VB6: Don't use it anymore.

I'd go so far as saying that VB.NET is freedom, and that VB6 only allows you to do what Microsoft wants you to do.

If you claim otherwise, I dare you to write a Console Application in VB6.

WayneB
WayneB
Got my own Far Side comic.
Sven Groot wrote:
If you claim otherwise, I dare you to write a Console Application in VB6.


No problem: http://www.pscode.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=38590

I still use VB6 because 1) I feel that .Net built desktop applications are resource hogs and 2) All of my tools and code modules are already written in VB6 and I don't want to do them over again.

I'll stop using VB6 when it stops working.
Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...

I know writing console apps in VB6 can be done, just not without some serious weird stuff. That was my point.

I'm not bashing VB6 per se, as said I spent years with it being my #1 programming environment. It's just that, imho, it pales next to VB.NET.

And I actually like VB syntax. Especially the fact that it doesn't use curly braces. Not that I have anything against curly braces, I just like End If better. But hey, I'm just weird like that. Wink

My very first program ever:
10 PRINT "Yesterday I didn't know what a program was."
20 PRINT "Today I'm a programmer."
30 END

I just LOVE VB, and now Amanda too!

It DOES make sense what she says, really couldn't have said it better myself Smiley

Amanda, please continue the great work you and your team do with VB!
rjdohnert
rjdohnert
You will never know success until you know failure
She's cute.
She is a very beautiful and inteligent lady! Great video guys!
Amru Yusrin
Amru Yusrin
Amru Yusrin Is Here :D
VB.Net is now not for Basic programmer, but it just like C++. It's so hard to used and understand. It seem VB.Net philosiphy is away from simplicity to program your computer....
Microsoft Communities