VB6:
s=App.EXEName
VB.Net:
Imports System.Reflection
With New System.IO.FileInfo([Assembly].GetExecutingAssembly.Location)
s=.Name.Substring(0, .Name.Length - .Extension.Length)
End With
or
s=System.AppDomain.CurrentDomain.FriendlyName
Note: this includes the extension which would need to be parsed.
VB6:
App.OleRequestPendingMsgText
App.OleRequestPendingMsgTitle
App.OleRequestPendingTimeout
App.OleServerBusyMsgText
App.OleServerBusyMsgTitle
App.OleServerBusyRaiseError
App.OleServerBusyTimeout
VB.Net:
No replacement; OLE automation not supported
VB6:
s=App.Path
VB.Net:
s=System.Windows.Forms.Application.StartupPath
or
Imports System.Reflection
With New System.IO.FileInfo([Assembly].GetExecutingAssembly.Location)
s = .FullName.Substring(0, .FullName.Length - .Name.Length - 1)
End With
Note: this will return the path with no trailing backslash even if the application is in the root directory. The VB 6.0 App.Path method return included the trailing backslash when the executable was in a root directory.