Results 1 to 4 of 4

Thread: Shell command alternatives

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241
    Are there any shell command alternatives

  2. #2
    Guest
    This is a better way than the Shell function.

    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
    Private Const SW_SHOWNORMAL = 1
    Private Const SW_SHOWMINIMIZED = 2
    Private Const SW_SHOWMAXIMIZED = 3
    Private Const SW_SHOW = 5
    Private Const SW_MINIMIZE = 6
    Private Const SW_SHOWMINNOACTIVE = 7
    Private Const SW_SHOWNA = 8
    Private Const SW_RESTORE = 9
    Private Const SW_SHOWDEFAULT = 10
    
    Call ShellExecute(Me.hwnd, "C:\file.exe", "C:\", vbNullString,
    vbNullString, SW_SHOWNORMAL)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    Question No form

    Thanks for the reply..

    My application does not use a form. Can I use something else than Me.hWnd ??

  4. #4
    Guest
    I believe you can use VbNullString.

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