frmAbout Form

frmAbout Form

The VB Application Wizard adds the frmAbout form to your project when you choose to add an About box standard form to the application. The About box opens when the user chooses About from the Help menu. It shows the version information for the application and has a command button that opens the System Information application. There is one compile error that you need to fix after upgrading. It is in the Form_Load event, and it occurs because the wizard uses the App.Revision property to generate the version information shown in the box. As we discussed in the previous section, you should replace the code

lblVersion.Text = "Version " & _ System.Diagnostics.FileVersionInfo.GetVersionInfo( _ System.Reflection.Assembly.GetExecutingAssembly.Location _ ).FileMajorPart _ & "." & System.Diagnostics.FileVersionInfo.GetVersionInfo( _ System.Reflection.Assembly.GetExecutingAssembly.Location _ ).FileMinorPart & "." & App.Revision

with the following:

lblVersion.Text = "Version " & Application.ProductVersion

In the StartSysInfo procedure, you ll also find a warning that Dir has a new behavior. This behavior difference applies to the Dir method when it is used to return a list of directories. In this case, since Dir is being used to determine whether the file Msinfo32.exe exists, the warning can be ignored, since it applies only to directories.



Upgrading Microsoft Visual Basic 6.0to Microsoft Visual Basic  .NET
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET w/accompanying CD-ROM
ISBN: 073561587X
EAN: 2147483647
Year: 2001
Pages: 179

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net