Life after Visual Basic 6.0 – Where to Go from Here
Wendy Logan
Test Software Product Manager, National Instruments
11500 N. Mopac Expressway, Austin, Texas 78759
Phone: 512-683-9311 Email: wendy.logan@ni.com
Abstract –
With Microsoft’s extended support for Visual Basic
(VB) 6.0 ending this year, many application developers are looking
for guidance on whether to upgrade, reuse, rewrite, or replace their
legacy VB 6.0 code in favor of developing on supported software
platforms. VB.NET, the designated successor of VB 6.0, looks more
like C++ than traditional Basic, making the move from VB 6.0 less
than ideal – but the move may be worth the effort. To develop
applications that take advantage of the latest .NET framework, you
have three basic options: upgrade/rewrite, reuse, or replace.
Upgrading or converting your VB 6.0 code to VB .NET makes your
application more compatible with future versions of VB and gives
you access to .NET features, but this option requires significant
rework. You could also stay with Visual Basic 6.0 for existing
applications that run critical tests, and then call this code from new
languages. Finally, you could replace your VB 6.0 code with code
written in another general-purpose language that supports .NET
such as C++ or C# or, you can move to one of several languages
specifically designed for test and measurement such as NI
LabVIEW, NI LabWindows/CVI, Agilent VEE, or HTBasic.
Keywords – visual basic, migration, .net.
I. INTRODUCTION
When the .NET technology was introduced in 2002, it was
clear that it represented a significant redesign of the
underlying Visual Basic programming language. For test
applications, the new features help with writing distributed
applications, organizing large programs, and achieving
maximum performance. Engineers want to migrate to Visual
Basic .NET to consolidate different code bases and software
competency, reduce upgrade and maintenance cost, ensure
ongoing training and official language support, take
advantage of the latest productivity enhancements and
language features, or create or improve existing distributed
applications, using the latest Web technologies.
To effectively analyze if and which applications you
should migrate to VB .NET, you must first understand the
key components of .NET, the differences between VB 6.0
and VB .NET, and your options for migrating to .NET. This
article will discuss the key elements of the .NET framework
and how to integrate or convert existing VB 6.0 applications
into .NET to realize these benefits.
II. THE BASICS OF .NET
The .NET framework includes a set of class libraries that
cover a number of common programming needs including
file I/O, database connectivity, Web application development,
and Windows services such as background printing and
integrated e-mail. One class library automatically generates
database-access objects, which you can then use to request,
update, and reconcile data between multiple data sources
without needing database programming skills [1]. There are
many other components of the .NET framework that offer
particular value to the test engineer, including ASP.NET,
Web services, and multithreaded APIs.
ASP.NET is a framework used to create interactive Web
pages that are well-suited for remote monitoring and control
applications. If the scarcity or location of test hardware
requires you to be able to remotely monitor or control a
system, creating a Web-based application may be the
solution. Because ASP.NET does not require run-time
engines to be installed on client computers, you do not need
to update each client with every new revision of the
application.
Web services are self-contained modular applications that
can publish information and be invoked across the Web. An
example Web service could make available all of the
calibration details for a transducer or instrument, eliminating
the need to manually enter that data into your PC.
Another useful .NET feature is the built-in multithreading
APIs. By using multiple threads in an application, you can
ensure that your applications will be responsive to the user
and, at the same time, be able to execute actions at regular
intervals. For instance, by isolating data acquisition (DAQ)
and user interface tasks on different threads, you can ensure
that user interface updates will not be delayed by calls to the
DAQ hardware and vice versa.
A. .NET Common Language Runtime
When choosing a development language for a new
project, many factors usually come into play including
personal preference and expertise, legacy code, and internal
and external support for the language. Because certain
languages may be appropriate for particular projects, many
companies have to maintain code bases that include
programming languages with different features and data
types. The .NET framework was designed to help address the
challenge of supporting systems written in different
programming languages. Instead of compiling directly down
to native machine code, VB .NET code, for example, is
compiled into an intermediate language called the Common
IEEE AUTOTESTCON 2008
Salt Lake City, UT, 8-11 September 2008
978-1-4244-2226-5/08/$25.00 ©2008 IEEE
Authorized licensed use limited to: CHINA UNIVERSITY OF MINING AND TECHNOLOGY. Downloaded on May 31, 2009 at 05:01 from IEEE Xplore. Restrictions apply.