App.Path Environment.GetCommandLineArgs






' crea una variabile contentente l'indirizzo dell'applicazione ..\debug




Private ReadOnly Property App_Path() As String
Get
App_Path = Environment.GetCommandLineArgs()(0) & "\.."
End Get
End Property


per il pda PALMARE:


Dim filePath As String = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)



'***********************************************

' settaggio della directory ROOT del programma

'***********************************************

MyDirPath = My.Application.Info.DirectoryPath
I = InStr(MyDirPath, "\bin\Debug")
If I > 0 Then
MyDirPath = Mid(MyDirPath, 1, I - 1)
End If

'************************************************



' compact


(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase)










( apppathenvironmentgetcommandlineargs.html )- by Paolo Puglisi - Modifica del 17/12/2023