Results 1 to 5 of 5

Thread: Start...Run

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Dubuque, IA
    Posts
    134

    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!

  2. #2
    jim mcnamara
    Guest
    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

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    VB Code:
    1. 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
    2.  
    3. Private Sub ShowRunDialog(ByRef MyForm As Form, Optional Title As String, Optional Description As String)
    4.    
    5.     If Title = "" Then Title = "Run"    
    6.     If Description = "" Then Description = _
    7.     "Type the name of a program to open, " & _
    8.         "then click OK when finished."    
    9.     SHRunDialog MyForm.hWnd, 0, 0, Title, Description, 0        
    10. End Sub

  4. #4
    jim mcnamara
    Guest
    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.)


  5. #5
    Megatron
    Guest
    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
  •  



Click Here to Expand Forum to Full Width