Blue Theme Orange Theme Green Theme Red Theme
 
Safari Books Online
Home | Forums | Videos | Photos | Blogs | Beginners
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
ANTS Performance Profiler 6.0
 Resources  
Close
 Our Network  
Close
Search :       Advanced Search »
Home » VB.NET » Key Changes in VB.NET for VB 6.0 Developer

Key Changes in VB.NET for VB 6.0 Developer


Using the .NET Framework, Microsoft Visual Basic developers can build robust applications that were very difficult to write in previous versions of Visual Basic. This article will discuss the Some of the key changes requiring redesign under VB.Net compared to VB 6.0.

Author Rank:
Total page views :  19791
Total downloads : 
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
Become a Sponsor

Introduction.

Using the .NET Framework, Microsoft Visual Basic developers can build robust applications that were very difficult to write in previous versions of Visual Basic. This article will discuss the some of the key changes requiring redesign under VB.Net compared to VB 6.0.

First, VB.NET includes a host of new features that enable developers to maximize their productivity. In addition to a new unified IDE (integrated development environment), VB developers can take advantage of the new Server Explorer to easily integrate server-side components into their apps, the shared Task List to help organize code, Dynamic Help for instant access to pertinent information, and Macros to customize, extend, and integrate the Visual Studio environment.

Let us see Some of the key changes requiring redesign under VB.Net compared to VB 6.0.

  1. Add-In Model has Changed:

    Add-Ins are still supported but the underlying extensibility object model has changed and existing add-ins will need to be rewritten. In some cases existing add-ins may no longer be needed as the new IDE is much more robust than the old IDE and also supports the creation of macros. For those that are still needed the new extensibility model is much more complete.

  2. Date and Time are renamed:

    In VB.Net the Today function replaces the old Date function and TimeOfDay replaces the Time function. The main difference between VB.Net and earlier versions is that Date/Time values used to be stored as double-precision values and could be manipulated directly. In VB.Net the internal format for dates and times has been changed and is not directly accessible.

  3. File I/O statements have changed:

    The VB.Net language does support some basic file I/O operations in the form of functions:

    Open:

    FileOpen(Channel, FilePath, OpenMode, OpenAccess, OpenShare, RecordSize)
    Read data:

    FileGet(Channel, DataBuffer, RecordNumber, ArrayIsDynamic, StringIsFixedLength)
    Input(Channel, DataBuffer)
    DataBuffer = LineInput(Channel)

    Write data:

    FilePut(Channel, DataBuffer, RecordNumber, ArrayIsDynamic, StringIsFixedLength)
    Print(Channel, DataBuffer)
    PrintLine(Channel, Data{, Data...})
    Write(Channel, Data{, Data...})

    Close:

  4. FileClose({Channel{,channel...}})
    Reset()
    ' close all files

  5. Strings in VB.Net:

    The String data type and basic string operations are essentially unchanged in VB.Net. Strings are still unicode and can be manipulated as in earlier versions. Due to the nature of the object-oriented underpinnings of dotnet, however, there are some new performance considerations and some new ways to do things.

    Once created, a String in VB.Net is immutable which means that it cannot be modified. That sounds contradictory but what it really means is that any time you make a change to a string value the original string is destroyed and a new string is created. The same was essentially true in earlier versions of VB except that the MID statement could be used to modify an existing string without needing to allocate an entire new string in memory. This technique was frequently used to provide a performance boost but is no longer possible. The MID statement is still supported syntactically but it still creates a new string.

  6. Controls have been redesigned with many properties/methods removed or renamed.

    For example the Listbox control in VB 6.0 presented a list of text strings to the user for selection. The VB.Net Listbox control is much more powerful in that it holds an array of objects instead of just strings. The display can be set to present any property of the objects (all objects must expose the same property name) and the click event returns a reference to the individual object. The control also supports using multiple columns, tab stops and sorting on demand.

  7. DAO/RDO Data Binding is not supported by the new controls.

    Data Binding is directly supported by the VB.Net controls using ADO.

  8. Parameters are passed ByVal by default.

  9. Control Arrays are gone.

  10. Fixed length strings are gone.

  11. Gosub, On/Gosub, On/Goto are gone.

  12. Names with leading underscores are not hidden.

  13. Implements implementation has changed.

  14. Null is now DBNull.

  15. Property syntax has changed.

  16. ObjPtr, VarPtr and StrPtr are gone.

  17. No more SET and limited default properties.

  18. Static procedures are not supported.

  19. Types are now Structures and LSET is gone.

  20. Variant, Empty, Null, Missing, IsNull and IsMissing are missing.

  21. WebClasses, ActiveX Documents and DHTML projects are now WebForms/ASP+.

  22. While/Wend is now While/End While.

  23. No more windowless controls.

  24. API Calls need updating.

  25. DIM As New is different.

  26. Arrays are always base Zero.

  27. VB.Net is not based on COM.

  28. Integer and Long are redefined.

  29. MsgBox defaults are different.

  30. ParamArrays are passed ByVal instead of ByRef.

  31. Property references can be passed ByRef.

  32. Currency data type is gone.

  33. DEFxxx statements not supported.

  34. DIM does not default to Object.

  35. DIM can be restricted in scope.

  36. ENUMs must be explicity identified.

Thus these are some key changes requiring redesign under VB.Net compared to VB 6.0.

Conclusion:

Visual Basic.NET is the result of a significant rebuild of Visual Basic for the Microsoft .NET Framework. There are a number of changes that make Visual Basic.NET easier to use, more powerful than Visual Basic 6.0, and give it the kind of access to system resources that in the past required the use of languages like C++. Rather than simply adding some new features to Visual Basic 6.0, Microsoft has re-engineered the product to make it easier than ever before to write distributed applications such as Web and enterprise n-tier systems.


Login to add your contents and source code to this article
 About the author
 
G Gnana Arun Ganesh
G.GNANA ARUN GANESH, an ECE graduate (1997-2001) seeking a profession in either Software or Hardware Company. During Campus interview selected as a Software Engineer at GREEN MICRO SYSTEMS Chennai, a German collaboration company. Due to down stream in software market they have cancelled the offer. His skills includes VB, COM/DCOM, ASP, VB.NET, C# and Embedded systems. He is also a writer of numerous articles for many technical Web sites.
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
SQL and .NET performance profiling in one place
Investigate SQL and .NET code side-by-side with ANTS Performance Profiler 6, so you can see which is causing the problem without switching tools.
Go.NET
Build custom interactive diagrams, network, workflow editors, flowcharts, or software design tools. Includes many predefined kinds of nodes, links, and basic shapes. Supports layers, scrolling, zooming, selection, drag-and-drop, clipboard, in-place editing, tooltips, grids, printing, overview window, palette. 100% implemented in C# as a managed .NET Control. Document/View/Tool architecture with many properties&events. Optional automatic layout.
Dundas Software
Dundas Chart for .NET is the most advanced .NET charting package available today.  With an extremely complete feature set, elegant architecture and easy implementation, Dundas Chart can quickly add advanced Charting functionality to enhance and transform ASP.NET and Windows Forms applications.  Whether you are implementing charting into internal projects, or building applications for clients, Dundas Chart offers advanced technology and advanced results to get the most out of data.
60 FREE UI Controls from DevExpress
Register for your FREE copy on over 60 free presentation controls from DevExpress - Absolutely Free-of-Charge without any royalties or distribution costs. Visit Devexpress.com/60 today. Free controls include advanced lists box, dropdown calendar, rich text edit, spin edit, tab control and so much more!

DevExpress engineers feature rich presentation controls and reporting tools for WinForms, ASP.NET, WPF, and Silverlight. Our technologies help you build your best, see complex software with greater clarity and deliver compelling business solutions for Windows and the web in the shortest possible time.
Clickatell's SMS Gateway
Clickatell's Developer Solutions allow you to SMS enable any website or application via a range of API's. Learn More about our API connections.
Free access to .NET Memory Management video
Everything you need to know about Garbage Collection, Temporary Objects, Fragmentation, Finalization and common causes of memory leaks in .NET. Watch the video here.
Microsoft Visual Studio 2010
Visualize your workspace with new multiple monitor support, powerful Web development, new SharePoint support with tons of templates and Web parts, and more accurate targeting of any version of the .NET Framework. Get set to unleash your creativity.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Developer-Ready ASP.NET 2.0 Web Hosting with 3 MONTHS FREE
Now supporting .NET 3.0 Framework with Windows Workflow Foundation, Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF), windows CardSpace (WCS)! Providing more flexibility for Developers with Web Services Support and a User/Permission Manger. Also supporting MS SQL 2005/2000 with Real-Time Backups, FREE Automated Attach .MDF Tool, FREE SQL Restore and Shrink SQL DB Tools, and SQL
Read the Top 10 Books for Microsoft Developers, 15 Days FREE
Read the Top 10 Books for Microsoft Developers, 15 Days FREE
Try Safari Books Online - 15 Days FREE + 15% Off for 1 Year
Try Safari Books Online - 15 Days FREE + 15% Off for 1 Year
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
Nevron Chart
Become a Sponsor
 Comments
ANTS Performance Profiler 6.0
 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Suggest an Idea  |  Media Kit
Current Version: 5.2010.8.14
 © 2010  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.