Results 1 to 4 of 4

Thread: Running .exe's from Vb Code

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    54

    Running .exe's from Vb Code

    can anyone help with the problem of running 3rd party .exe files from Visual Basic code?

    Thank you.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Running .exe's from Vb Code

    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    4. (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
    5. ByVal lpParameters As String, ByVal lpDirectory As String, _
    6. ByVal nShowCmd As Long) As Long
    7.  
    8. Private Const SW_SHOWNORMAL = 1
    9.  
    10. Private Sub Command1_Click()
    11. ShellExecute Me.hwnd, vbNullString, "c:\hack.exe", vbNullString, "C:\", SW_SHOWNORMAL
    12. End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    54

    Re: Running .exe's from Vb Code

    Shell command.

    Sorry to bother you guys, sometimes the answer is right in front of you.

    It's been a hard day coding already.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Running .exe's from Vb Code

    I've always preferred shellexecute, but, Shell will work.

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