App Object Changes in Visual Basic .NET
Visual Studio .NET 2003
The App object in Visual Basic 6.0 was a global object used to set or retrieve information about the application. There is no direct equivalent for the App object in Visual Basic .NET; however, most of the properties can be mapped to equivalent properties in the .NET Framework.
Note The App object's Version Information properties are replaced by Assembly attributes in Visual Basic .NET. Version Information properties were set in the Project Properties dialog box; Assembly attributes are set by editing the AssemblyInfo file in the Visual Basic .NET project. For more information, see Attributes.
App Object Properties
| Visual Basic 6.0 | Visual Basic .NET Equivalent |
|---|---|
| Comments | AssemblyDescription attribute |
| CompanyName | AssemblyCompany attribute |
| EXEName | System.Reflection.Assembly.GetExecutingAssembly.Location
|
| FileDescription | System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileDescription |
| HelpFile | No equivalent. For more information, see Help Support Changes in Visual Basic .NET. |
| HInstance | System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0)).ToInt32 |
| LegalCopyright | System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).LegalCopyright |
| LegalTrademarks | System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).LegalTrademarks |
| LogEvent method | No equivalent. Logging in Visual Basic .NET is handled via Event Logs. For more information, see Creating and Removing Custom Event Logs. |
| LogMode | No equivalent. Logging in Visual Basic .NET is handled via Event Logs. For more information, see Creating and Removing Custom Event Logs. |
| LogPath | No equivalent. Logging in Visual Basic .NET is handled via Event Logs. For more information, see Creating and Removing Custom Event Logs. |
| Major | System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileMajorPart
|
| Minor | System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileMinorPart
|
| NonModalAllowed | No equivalent. This was a read-only property related to ActiveX .dll files. The .NET common language runtime automatically manages this behavior. |
| OleRequestPendingMsgText | No equivalent. This property relates to OLE automation, which is not supported by Visual Basic .NET. |
| OleRequestPendingMsgTitle | No equivalent. This property relates to OLE automation, which is not supported by Visual Basic .NET. |
| OleRequestPendingTimeout | No equivalent. This property relates to OLE automation, which is not supported by Visual Basic .NET. |
| OleServerBusyMsgText | No equivalent. This property relates to OLE automation, which is not supported by Visual Basic .NET. |
| OleServerBusyMsgTitle | No equivalent. This property relates to OLE automation, which is not supported by Visual Basic .NET. |
| OleServerBusyRaiseError | No equivalent. This property relates to OLE automation, which is not supported by Visual Basic .NET. |
| OleServerBusyTimeout | No equivalent. This property relates to OLE automation, which is not supported by Visual Basic .NET. |
| Path | System.Reflection.Assembly.GetExecutingAssembly.Location
|
| PrevInstance | No equivalent. For more information, see PrevInstance Property Changes in Visual Basic .NET. |
| ProductName | System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).ProductName |
| RetainedProject | No equivalent. Visual Basic .NET does not have the ability to retain a project in memory. |
| Revision | System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileBuildPart
– or – System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FilePrivatePart
|
| StartLogging method | No equivalent. Logging in Visual Basic .NET is handled via Event Logs. For more information, see Creating and Removing Custom Event Logs. |
| StartMode | No equivalent. In Visual Basic 6.0, this property was used to start an application as an ActiveX component. ActiveX component creation is not supported in Visual Studio .NET. |
| TaskVisible | No equivalent. For more information, see TaskVisible Property Changes in Visual Basic .NET. |
| ThreadID | No equivalent. The threading model is different in Visual Basic .NET. |
| Title | No equivalent. In Visual Basic .NET, the Text property of the main form in the application determines the title that will be shown in the Task Manager. |
| UnattendedApp | No equivalent. For unattended applications in Visual Basic .NET, choose a Console Application project. |
See Also
Control Changes in Visual Basic .NET | Screen Object Changes in Visual Basic .NET