ps71
March 1st, 2000, 04:34 AM
Hello!!
How to start notepad with app.path
/peter
How to start notepad with app.path
/peter
|
Click to See Complete Forum and Search --> : app.path ps71 March 1st, 2000, 04:34 AM Hello!! How to start notepad with app.path /peter Chris Eastwood March 1st, 2000, 06:06 AM You can do this with the ShellExecute Windows API call : eg. In your forms declaration section : ' 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 ' Now when you want to open NotePad with the path set at 'App.Path' : ShellExecute 0, "open", "notepad.exe", "", App.Path, 1 You'll obviously need to change the path for the 'Notepad.exe' program (unless you have notepad.exe already in your path) Chris Eastwood CodeGuru - the website for developers http://codeguru.developer.com/vb Lothar Haensler March 1st, 2000, 06:07 AM use the ShellExecute API and specify App.path as the "directory" parameter (the 5th parameter) or chdrive and chdir to app.path and use the Shell command in VB codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |