Working Directory
-
In a windows icon properties there is a field called "start in". You can point your app to a different directory using this field. Does anyone know how I can access this field from inside my VB app? Thanks
-
In a windows icon properties there is a field called "start in". You can point your app to a different directory using this field. Does anyone know how I can access this field from inside my VB app? Thanks
You have to make a call to a windows API, see the code below. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Const SW_SHOWMAXIMIZED = 3 ShellExecute Form1.hwnd, "open", ProgramStart, programoption, ProgramPath, SW_SHOWMAXIMIZED
-
You have to make a call to a windows API, see the code below. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Const SW_SHOWMAXIMIZED = 3 ShellExecute Form1.hwnd, "open", ProgramStart, programoption, ProgramPath, SW_SHOWMAXIMIZED
Thanks for the info. I'll give it a try.