1、 中文 5230 字 外文文献原文: Ready to upgrade Visual Basic 6.0 applications to Visual Basic.NET Outline This document is to use Microsoft Visual Basic developers to provide the application to upgrade to Microsoft Visual Basic.NET recommendations. Visual Basic.NET can open the Visual Basic 6.0 projects to Visu
2、al Basic.NET upgrade its technology. However, in most cases, the project to upgrade to Visual Basic.NET, you need to make some changes to the project. The purpose of this document is on the design and implementation of the current Visual Basic project to provide recommendations to upgrade to Visual
3、Basic.NET only after a minimum of changes. Where appropriate, we will use the new language structure; However, this document is not a language reference for Visual Basic.NET. What is Visual Basic.NET? Visual Basic.NET is the next version of Visual Basic. Microsoft re-designed the product, rather tha
4、n simply as Visual Basic 6.0 add some new features. The new version easier than previous versions of the preparation of distributed applications, such as Web and enterprise n-tier system. Visual Basic.NET with two new forms packages (Windows Forms and Web Forms); used to access the disconnected ADO
5、data source for the new version; the latest model of the language, remove the traditional keyword, improved type security and advanced developers need to open a low-level structure. These new features for the Visual Basic developer opened a new door: Use the Web Forms and ADO.NET, to rapidly develop
6、 scalable Web sites; through the inheritance, the language can be a real object-oriented programming support; Windows window body itself to support access and visual inheritance; now deploy your application as the executable files and components from one directory to another directory so simple. Vis
7、ual Basic.NET is now available in other languages fully integrated with Microsoft Visual Studio.NET. You can not only use different programming language to develop application components, and your class can now cross-language inheritance to inherit classes written in different languages. Using the u
8、nified debugger can now debug multiple language applications, regardless of whether they are run locally or on a remote computer. Finally, no matter what language you use, Microsoft. NET Framework is the Microsoft Windows and Internet provides a rich API. Why not 100 percent compatible with Visual B
9、asic.NET? Visual Basic.NET can be designed to consider two options: Update to the existing code base. NET framework to run; or build from scratch to fully leverage the platforms advantages. To reach the customers most in need of features (such as inheritance and Threading), to provide the platform f
10、or full and unrestricted access, and to ensure the next generation of Visual Basic can access Web application, the right decision in the new platform the generation from scratch. For example, in Windows Forms in a number of new features can be used as new controls or more properties to add to the ex
11、isting code base. However, this will put all other important functions (such as security and visual inheritance) the cost of succession to the Windows form. Our main goals is to ensure that the Visual Basic code can be completely and use of other languages (such as Microsoft Visual C # , or Microsof
12、t Visual C + + ) write code to work, and to Visual Basic developers easy to use. NET Framework features without using the traditional Windows API programming tools to make work. And Visual C + + and any other common language runtime to target the same language, Visual Basic now has the same variable
13、 type, array, user-defined types, classes and interfaces; but we have removed from the language of certain functions, For example, an array of fixed-length strings and non-zero. Visual Basic is now a true object-oriented language; some non-intuitive and inconsistent feature has been removed from the
14、 language, such as GoSub / Return and DefInt. The result is a Visual Basic more dynamic, it will continue to be Windows-based application that creates the best tools, and now to create the next generation of Web site to be the best tool. Upgrade to Visual Basic.NET Visual Basic.NET from the basic pr
15、inciples of the traditional Windows development to build next generation Web and n-tier applications. Therefore, you need to upgrade the code to use the advantages of Visual Basic.NET. Open in Visual Basic.NET in Visual Basic 6.0 project, it will automatically appear, Upgrade Wizard to guide you thr
16、ough the upgrade process, and automatically create a new Visual Basic.NET project (your existing project will not change). This is a one-way process; in Visual Basic 6.0 can not open a new Visual Basic.NET project. Works after the upgrade, language change due to syntax changes, your form is converte
17、d to Visual Basic 6.0 Windows Forms. In most cases, the upgrade code also need to be some changes. This is because certain objects and language features in Visual Basic.NET is not equivalent to the content, or for automatic updates, the equivalent content differences too. After the upgrade, may also
18、 need to change your applications to use Visual Basic.NET some of the new features. At the same time using Visual Basic 6.0 and Visual Basic.NET Visual Basic.NET support for Visual Basic 6.0 upgrade project; If you have a Visual Basic, version 1 to version 5, the preparation of the project, we recom
19、mend that you load it into VB6 (the choice to upgrade Microsoft ActiveX controls), compile and save the project, and then upgrade the project to Visual Basic.NET. Visual Basic.NET and Visual Basic 6.0 can be installed on the same computer and run. Similarly, with Visual Basic.NET and Visual Basic 6.
20、0 applications written can also be installed on the same computer and run concurrently. Components written using Visual Basic.NET with earlier versions of Visual Basic, and COM components written in other languages to work together. For example, can be written using Visual Basic 6.0 ActiveX controls
21、 to Visual Basic.NET Windows Forms drag and drop, use Visual Basic.NET Class Library in Visual Basic 6.0 COM objects, or to Visual Basic 6.0 executable file to the Visual Basic.NET Library. Components with Visual Basic.NET compiler and compiled using Visual Basic 6.0 runtime components are slightly
22、different. For the initial application, as Visual Basic.NET objects through garbage collection release, so if the object is explicitly removed from memory before they actually delete, may be a delay. Other differences, such as variant / object changes will note later in this article. A result of the
23、se differences is a common application with Visual Basic.NET Visual Basic 6.0 application running with similar characteristics, but not identical. In addition, Visual Basic.NET to Visual Basic.NET and Visual Basic 6.0 components in between these components do not binary compatible. Components are no
24、w more powerful than before, version management and deployment system, you can simply copy files to a directory (no longer RegSvr32) to deploy the file, and upgrade to new version of the component as a new file to replace the old files as easy. You have to do is to ensure that classes and methods co
25、mpatible with earlier versions. Architecture proposed . NET platform on the improvement of early architecture on the scalability of distributed applications and to provide more powerful support, although it has disconnected data access, message-based HTTP-based file transfer and deployment (no longe
26、r is a component registration). To take full advantage of these features in the design of your application architecture used, should be used in Visual Basic.NET similar architecture. Browser-based applications Visual Basic 6.0 and Microsoft Visual Studio 6.0 to create a browser-based Internet and In
27、tranet applications provide the following types of technologies: Webclass DHTML project ActiveX Document Active Server Pages (ASP) Visual Basic.NET introduces an enhanced version that is ASP ASP.NET, and with the Web form to the architecture, Web form is the case with Visual Basic HTML page. Architecture is