Looking for App in VB.NET

zhaozj2021-02-16  49

Summary

Developers who have used Visual Basic 6 have almost all APP objects, and it is also known for the function of strong people. So do you have similar objects in Visual Basic .NET? Next, further explanation will be further described below.

table of Contents

APP

2. Find similar functions in VB.NET

3. Simple example

4. Small knot

APP

In Visual Basic 6, the App is a global object to access directly through the app key. App objects can get information such as headings, versions, paths, execution file names, etc., and can be used to determine whether the previous instance of the application is run. App objects don't exist in VB.NET, but we can still use other objects from VB.NET to get the same functionality as apps.

2. Find similar functions in VB.NET

The Comments property of the app in the original Visual Basic 6 is similar to system.diagnostics.fileversioninfo.diagnostics.FileVersionInfo.getvestationsInfo (System.Reflection.Assembly.GETEXECUTINGATIONASSEMBLY.LOCATION) .comments attribute

The company's CompanyName property in the original Visual Basic 6 is similar to System.Diagnostics.fileversionInfo.diagnostics.FileVersionInfo.getversionInfo (System.Reflection.Assembly.GETEXECUTINGASSEMBLY.LOCATION) .CompanyName property in Visual Basic .NET.

The exename property of the app in the original Visual Basic 6 is similar to the VB6.Getexename attribute in Visual Basic .NET.

FileDescription attribute in Visual Basic 6 is similar to system.diagnostics.fileversioninfo.diagnostics.fileVersionInfo.diagnostics .FileDescription attribute in Visual Basic .NET.

The HelpFile property of the app in the original Visual Basic 6 has no similar properties in Visual Basic .NET

The Hinstance property of the APP in the original Visual Basic 6 is similar to the VB6.GethinStance property in Visual Basic .NET.

LegalCopyRight attribute in Visual Basic 6 is similar to system.diagnostics.fileversioninfo.diagnostics.fo (System.Reflection.Assembly.GETEXECUTINASSEMBLY.LOCATION) .legalcopyright attribute in Visual Basic .NET .legalcopyright attribute

LegalTradeMarks attribute in Visual Basic 6 is similar to system.diagnostics.fileversioninfo.diagnostics.Diagnostics.FileVersionInfo.getEMBLOCATION .legaltrademarks attribute in Visual Basic .NET. De

The LOGEVENT method of the original Visual Basic 6 is no similar approach in Visual Basic .NET

The LogMode property of the APP in the original Visual Basic 6 has no similar properties in Visual Basic .NET

The LogPath property of the APP in the original Visual Basic 6 has no similar properties in Visual Basic .NET

Visual Basic 6 in the original App of Major properties similar to Visual Basic .NET in System.Diagnostics.FileVersionInfo.GetVersionInfo (System.Reflection.Assembly.GetExecutingAssembly.Location) .FileMajorPart attribute the original Visual Basic 6 in the Minor App properties similar to Visual Basic. NET in system.diagnostics.fileversioninfo.getversionInfo (System.Reflection.Assembly.GetexecutingAssembly.- location) .fileminorpart properties

The NonModalaLowed property of the app in the original Visual Basic 6 has no similar properties in Visual Basic .NET

The OLERequestpendingMsgText property in Visual Basic 6 in Visual Basic .NET has no similar properties.

OleRequestpendingMsgtitle attribute in Visual Basic 6 in Visual Basic .NET has no similar properties

The OLERequestpendingTimeout attribute in Visual Basic 6 is no similar properties in Visual Basic .NET

OleserBusymsgText attribute in Visual Basic 6 in Visual Basic .NET has no similar properties

OleserBusymsgtitle attribute in Visual Basic 6 in Visual Basic .NET has no similar properties

OleserBusyraiseError property in Visual Basic 6 does not have similar properties in Visual Basic .NET

OleserBusytimeout attribute in Visual Basic 6 in Visual Basic .NET has no similar properties

The Path property of the APP in Visual Basic 6 is similar to VB6.GetPath attribute in Visual Basic .NET.

Previous Visual Basic 6 APP's Previnstance properties Similar to Ubound in Visual Basic .NET (Diagnostics.Process.GetProcesSbyName (Diagnostus.Process.GetCurrentProcess.ProcessName)> 0 expressions

The ProductName property in the original Visual Basic 6 is similar to system.diagnostics.fileversioninfo.diagnostics.fileVersionInfo.glect.Location in Visual Basic .NET .ProductName Properties .ProductName Properties

The RetainedProject property of the APP in Visual Basic 6 has no similar properties in Visual Basic .NET

The revision attribute of the APP in the original Visual Basic 6 has no similar properties in Visual Basic .NET

The StartLogging method of the APP in the original Visual Basic 6 is no similar approach in Visual Basic .NET

The StartMode property of the APP in the original Visual Basic 6 has no similar properties in Visual Basic .NET

The Taskvisible property of the APP in the original Visual Basic 6 has no similar properties in Visual Basic .NET

The threadID attribute of the APP in the original Visual Basic 6 has no similar properties in Visual Basic .NET

The Title property of the app in the original Visual Basic 6 is similar to the system.reflection.assembly.getexecutingassembly.getname.Name.Name .Name.Name.Name.Name.Name.Name.Name.Name.Name The unattendedApp property in Visual Basic 6 does not have similar properties in Visual Basic .NET

3. Simple example

Here, you can get the path to the current application as an example, first reference the VisualBasic.comPatibility namespace, click the "Reference" item in the Main Menu "Project", and select "Microsoft Visual Basic .Net Compatibility Runtime".

At this point, the Microsoft.visualBasic.comPatibility namespace will appear in the reference list.

Enter code in new console projects

Imports Microsoft.visualBasic.comPatibility

Module Module1

Sub main ()

Console.writeline (VB6.GetPath)

End Sub

End module

The result is still the same as the result of app.path using VB6.

4. Small knot

The VB6 programmer has these and app similar attributes or methods that can be easily applied to .NET.

转载请注明原文地址:https://www.9cbs.com/read-27490.html

New Post(0)