<-- Previous || Up || Next -->

Shell No Wait Function
Windows API Class

Public Function ShellNoWait( _
      ByVal vCommand As String _
    , Optional ByVal vFocus As Variant _
    , Optional ByVal vSendKeys As Variant _
    ) As Long

Executes a Windows or DOS program without waiting for it to complete.
Its window gets the specified focus.
Function optionally sends keystrokes to the program.
Function returns either 0 (zero) upon success or the number of the error encountered.

Examples:
    ShellNoWait("CharMap.Exe", vbNormalNoFocus) = 0
    ShellNoWait("NotePad.Exe NewFile.Txt") = 0
See also:
    ShellWait Function
    vbNormalFocus Property, et. al.
    PrefixSendKeysMetaCharacters Function
    Shell Function (Visual Basic)
    SendKeys Statement (Visual Basic)
vCommand: The Windows or DOS command that is to be executed. This command line must include a program name, and it can optionally include one or more command line arguments.

vFocus: The focus given to program's window. Should be one of the Visual Basic focus Constants like vbNormalFocus, vbNormalNoFocus, etc. vFocus defaults to vbNormalFocus if it is missing or Null or cannot be fixed-up to a number.

vSendKeys: String that will be sent to the program as keystrokes after it is started. vSendKeys defaults to an empty string (no keystrokes will be sent) if it is missing or Null or cannot be fixed-up to a string.
Warning: vSendKeys is ignored if vFocus is vbHide, vbMinimizedNoFocus, or vbNormalNoFocus.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.