Results 1 to 2 of 2

Thread: Help. How to launch win32 apps from VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Location
    IL
    Posts
    3

    Question

    I am very new to VB. I need a command to launch/execute a Win32 app in a windows environment. To make it more interesting, I have a list of switches that must follow the command.

    Any help is appreciated... thanks ...KUBIE

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    You have several possibilities
    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
    
    ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]", vbNullString, "C:\", SW_SHOWNORMAL
    
    'or
    ShellExecute Me.hwnd,"notepad", vbNullString, vbNullString, "C:\", SW_SHOWNORMAL
    Or use the Shell function
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

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