Solved

What's new in VB.NET?

Posted on 2001-06-15
16
245 Views
Last Modified: 2010-05-02
I am a Visual Basic 6 developer, client-server applications. Can someone tell me what are the new things vb.net brings to developers?
0
Comment
Question by:redundguy
  • 6
  • 2
  • 2
  • +5
16 Comments
 
LVL 2

Expert Comment

by:chandukb
ID: 6195872
interesting topic, just taking a ride along :)

Chandu
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 6195910
Wow..... I think you'd get a shorter answer if you were to ask what hasn't changed....

That one's simple enough: the syntax is much the same.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 6195917
But.

VB.NET is built on the .NET framework. As such it shares the so-called "Common Language Runtime" with every other .NET language.

As a result, the .NET languages no longer need to rely on COM in order for components written in one language to understand components written in another.

Not that .NET makes COM obsolete, it makes it optional.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 6195925
Further. With .NET, VB has finally become completely worthy of the label "Object Oriented". VB.NET is fully OO.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 6195937
Everything is done through the CLR and the .NET Framework. You can still design Forms in a way similar to how you used to in VB6. But beneath the bonnet everything's changed.

Everything that has to do with creating your form is now exposed as code, and run through the Framework. It gives you total flexibility.

Perhaps you've been playing around with some advanced API stuff in VB6? You can chuck most of that away now in .NET, as most of what you would possibly want to do with a Window is now fully supported through the Framework.

Sizing and re-sizing forms and repositioning controls has become a doddle (I'm glad to say that what M$ have implemented is *exactly* what I've always been suggesting to people who had problems with resizing forms in EE :o)
0
 
LVL 10

Accepted Solution

by:
caraf_g earned 133 total points
ID: 6195977
Localisation has been greatly improved. You can design many different language versions of the same UI and compile them all together. It's not just text on controls, you can even resize and / or reposition controls depending on the locale.... amazing stuff.



Is there actually a down side to .NET?

Of course, but it is more one of attitude than a real problem.

You'll find that some pretty straightforward things suddenly don't seem to work anymore. Silly little things. "Caption" doesn't exist anymore, it's "Text". And things like that.

A lot of people who looked at the Beta of VB.NET had problems with that. I haven't. But I think it is because I treat VB.NET as a different language, not as a continuation of VB6
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6196050
What's changed is that programs that were coded badly will break! :)

People who did not use good programming practices will have to clean up their code in order to complete the conversion.

Summary:
* undefined variables will change from being variants to being objects
* DAO and RDO are no longer fully supported, so upgrade to ADO ASAP
* all types double in size, so anything defined as Integer must be renamed as Short to maintain compatibility, and Long becomes Integer
* late-bound items will likely break in the conversion
* date fields defined as double will cause problems
* object default properties are no longer supported (i.e. "msgbox Text1" will generate an error; you must use "msgbox Text1.Text")
* booleans math will require new keywords (BitAnd, BitOr, BitNot, BitXor)
* -1 and True are no longer necessarily equal (i.e. True is boolean, -1 is integer)
* zero-based arrays are the only game in town (Dim x(10) creates an array of x(0)-x(9)!)
* Named constants should be used in place of values (use vbYes rather than 7 for messageboxes; etc.)
* Legacy features go away (DefInt, DefStr, ..., On Goto, On Gosub, Return, VarPtr, LSet, etc.)
* Shapes will go away and must be replaced with new functions
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6196129
ping... :)
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6196132
0
 
LVL 1

Author Comment

by:redundguy
ID: 6196364
Thank you for answers, caraf_q and rspahitz.
Realy I don't know now what answer is better.
I'll decide until monday.

0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6196372
hope you will get more comments about it.
0
 
LVL 7

Expert Comment

by:Joe_Griffith
ID: 6196553
I've programmed with VB since version 1.0 (and BASIC before that).  I've been working with VB.NET since Beta 1 was released.  The two are very different!  When I first started with VB.NET I spent hours trying to do something that would have required seconds in VB6.  A big part of this is that the beta 1 documentation is pretty thin and also there are bugs in beta 1 that can make it difficult to know when the problem is your fault and when it is the system's.

There are many things that I like about VB.NET.  I especially like the structured error handling (Try, Catch , Finally).  ADO.NET is to ADO what ADO was to DAO, that is, they are used to accomplish similar things but the syntax is completely different.  The underlying concepts behind ADO.NET are also rather different compared to ADO and take some getting used to.  In addition they have already said that there will be some changes in the ADO.NET syntax in beta 2 (the DataSetCommand object will be called something else).

Visual Studio.NET has many really neat features.  So many that you don't really have room to use them all.  They've done some really clever things that allow you to pull in explorers, property lists, etc. as required from the sides of the screen.  I am using a system with two 21-inch monitors and I still don't have enough room to see everything I want to see.

VB.NET is very object oriented (if you aren't already programming with classes/objects you will be way behind).  Almost all of the data types have changed (no variants, no currency, integers are what used to be longs (4 bytes), etc.  All of this takes some getting used to.

Here is an example of how the syntax has changed.  In VB6 you can initialize a string with repeating characters like this:

Dim MyString as String
MyString = String$(5,"X")

MyString will then be "XXXXX".  in VB.NET you do it like this:

Dim MyString as string
MyString = New String("X"c, 5)

That may seem like a small difference but I spent hours trying to find how to do it (yes that "c" is required).

Forms and controls have changed a lot.  There are no control arrays (which I used a lot).  Many of the properties have changed (labels have a text property rather than a caption property for instance).  This isn't that big of a deal except that all your experience goes down the drain as you spend 10 minutes trying to set a label's caption property and can't find it.

The debugging facilities in Visual Studio .NET are super.  Almost everything has been improved dramatically (once again it takes time to get used to things like single stepping with F11 rather than F8).

Anyway I'm looking forward to the release of Beta 2 (MS has indicated that it will be available next week).

0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6196945
Gee, Joe_Griffith, a lot of what you describe sounds like Java in Visual Cafe (including F11)!  Maybe it won't be that hard for me :)
0
 
LVL 6

Expert Comment

by:andyclap
ID: 6197959
One thing I hate about VB.NET is that you have to have bracketed parameters in all calls, even subs. I guess I'll get used to it though; can't wait for visual inheritance.
0
 
LVL 1

Author Comment

by:redundguy
ID: 6201013
Thank you Joe_Griffith too.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 6201123
Thanks! :o)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now