http://www.developer.com/

Back to article

What's Coming in VB.Net


November 19, 2002

It's a confusing time for programmers.

We've all heard the hype surrounding the next version of Visual Basic; it'll revolutionise our lives, it'll unify the environment in which Windows programmers work, it'll streamline your applications with the .Net strategy.

But actually getting someone to explain in practical terms what this means to the end developer is a completely different matter.

Thankfully, Microsoft has recently released the Beta 1 version of the new VB.Net development system so we're no longer restricted to the selective pie-in the-sky information handed out by the press office.

It's now time for an update, a realistic look at what you can expect to see change as we enter a new phase in Visual Basic programming.

So, what will the next version of Visual Basic - VB.Net - give us? Let's review everything what we know so far...

  • Co-existence - you'll be able to install Visual Basic 6.0 and VB.Net on the same machine without conflicts
  • Structured Error Handling the new version will support Try, Catch and Finally error handling techniques, as found in C++ and Java
  • Auto Upgrade when you open a VB6 project in VB.Net, many of the features no longer supported with be automatically upgraded
  • Control Anchors you can anchor a control to an area of the screen, such as the lower right hand corner of a form - and it will stay there, even if the form is resized
  • No PrintForm you'll no longer find a PrintForm method in VB.Net and there's no replacement planned
  • Web Forms develop applications for the Internet in your favourite programming language, integrated with ASP.Net
  • ADO.Net improved ADO performance apparently, though no further detail yet
  • Integer to Short the present-day 16-bit Integer will become Short, whilst the 32-bit Long will turn into an Integer. The Long data type will remain in existence as a 64-bit number
  • No GoTo this statement will no longer exist
  • Zero-Based Arrays you can no longer declare arrays between your own boundaries, they all must be zero-based. This also means the Option Base statement serves no purpose, hence will be removed
  • Different Property Procedures the Get and Let parts of a property procedure will all be placed inside the one property declaration, no longer separated into two
  • No More Defaults don't rely on default properties in VB.Net they won't work. You must explicitly specify everything you use, such as Text1.Text = "MyText" rather than simply Text1 = "MyText"
  • New Forms no more regular forms, enter stage right - all-singing, all-dancing generic Windows Forms
  • Context Menus Windows Forms have one main menu and a separate context menu for popups, both of which you can change via a new built-in on-form editor
  • Goodbye Variant there'll be no more Variant data type, though the Object type will now be able to hold a primitive data type, Empty, Nothing, Null or a reference to an object
  • Improved Operations new clipboard and drag-and-drop features
  • Web Services easily expose your objects via the Web with the Simple Object Access Protocol (SOAP)
  • No DAO/RDO Binding don't upgrade straight away if your application uses DAO/RDO data controls
  • Unified IDE all Microsoft languages will use the same development environment
  • Extensibility Model all Microsoft development environments will have the same extensibility object model, allowing you to, say, write a C++ add-in within Visual Basic
  • Easier Deployment you can register components by simply copying them into a directory, no more regsvr32.exe
  • No OLE Container this control has been removed
  • New Graphics Methods which will replace Circle, CLS, PSet, Line and Point
  • No Shape or Line Controls all removed
  • Inheritance object-orientated buzzword that means you can derive a class from its parent class
  • Short-Circuit Evaluation If you run this code in Visual Basic 6, it will gets the result of both functions, then evaluate them: If Function1() And Function2() Then ... but in VB.Net, if the first call returns a False, the operation is immediately aborted
  • Miscellaneous Initialise variable values on the same line as you declare them. No more fixed-length strings. No fixed-size arrays when using UDTs. No GoSub/Return. No VarPtr, ObjPtr, StrPtr and such. No more LSet. No more 'As Any' declarations. Setting a Timer to 0 will no longer disable it. Windows forms will not support DDE. The Name property will no longer by available at runtime. True will no longer equal 1, it will equal 1. In VB.Net, adding a Null to another string will generate a mismatch error, whereas currently the whole concatenation operation would return a Null. And, Or, Not and Xor will no longer be Boolean operators they will be replaced with BitAnd, BitOr, BitNot and BitXor.

Top Tip: For more in-depth information on the differences between Visual Basic 6 and VB.Net, check out this Microsoft document: http://msdn.microsoft.com/library/techart/vb6tovbdotnet.htm. You can also read our early look at Visual Basic 7, in this article: http://www.vb-world.net/articles/vb7/.

So there we have it; a brain dump on all the key issues a developer needs to know about VB.Net.

It's going to mean change. And nobody ever likes change.

But as I learn more and more about the new technologies that will be sprouting up this year, I have to say it all becomes less and less threatening - and suddenly one realises that we're actually headed for a much greener field.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date