|
-
May 31st, 2002, 02:37 PM
#1
Thread Starter
Addicted Member
Start...Run
Can I do a Start...Run command from VB. Thanks for any help! GENE
I NEED TO RUN THIS:
RunDll32 advpack.dll,LaunchINFSectionEx C:\Winnt\INF\mstask.inf,,,256
Last edited by Eugenious; May 31st, 2002 at 02:43 PM.
I'm not a bad guy, just bad at being a good guy!
-
May 31st, 2002, 02:40 PM
#2
If you know the path & .EXE name, VB supports
Code:
Shell "c:\myfolder\myfile.exe", 1
You can also use the ShelleExecute api
Code:
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_SHOWNORMAL = 1
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: [email protected]
'Send an E-Mail to the KPD-Team
ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
-
May 31st, 2002, 02:41 PM
#3
VB Code:
Private Declare Function SHRunDialog Lib "shell32" Alias "#61" (ByVal hOwner As Long, ByVal UnknownP1 As Long, ByVal UnknownP2 As Long, ByVal szTitle As String, ByVal szPrompt As String, ByVal uFlags As Long) As Long
Private Sub ShowRunDialog(ByRef MyForm As Form, Optional Title As String, Optional Description As String)
If Title = "" Then Title = "Run"
If Description = "" Then Description = _
"Type the name of a program to open, " & _
"then click OK when finished."
SHRunDialog MyForm.hWnd, 0, 0, Title, Description, 0
End Sub
-
May 31st, 2002, 02:59 PM
#4
I'm not sure what he wanted - the run dialog box itself, or what happens when you put something in the run box.
Either way, he's covered.
(Now watch him say this wasn't what he wanted at all.)
-
May 31st, 2002, 03:28 PM
#5
Code:
Shell "RunDll32 advpack.dll,LaunchINFSectionEx C:\Winnt\INF\mstask.inf,,,256"
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
|