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
Printable View
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
If you know the path & .EXE name, VB supports
You can also use the ShelleExecute apiCode:Shell "c:\myfolder\myfile.exe", 1
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
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
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.)
:D :D
Code:Shell "RunDll32 advpack.dll,LaunchINFSectionEx C:\Winnt\INF\mstask.inf,,,256"