|
-
March 1st, 2000, 05:34 AM
#1
app.path
Hello!!
How to start notepad with app.path
/peter
-
March 1st, 2000, 07:06 AM
#2
Re: app.path
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
-
March 1st, 2000, 07:07 AM
#3
Re: app.path
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|