Results 1 to 4 of 4

Thread: Using VB to call another application

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    13

    Exclamation Using VB to call another application

    I need to use VB to call another application using a button. Plesae help!!!!

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    When you say call, do you mean open? If so, there's no need for API.

    VB Code:
    1. Shell "SomeApp.exe", 1

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Use shell execute api
    Kanaka Prasad

  4. #4
    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 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
    2.  
    3. Private Const SW_SHOWNORMAL = 1
    4.  
    5. Private Sub Command1_Click()
    6. ShellExecute Me.hwnd, vbNullString, "MyProg.Exe", vbNullString, "C:\Program Files\MyFolder\", SW_SHOWNORMAL
    7. End Sub

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