Purpose : The Shell function runs a specified .EXE , .COM , .BAT OR .PIF program.
Syntax :
Shell ( program-name$ [ , mode% ] )
A% = Shell ( " WINWORD.EXE " )
B% = Shell ( " C : \ WORD \ WINWORD.EXE " , 3 )
The Shell function loads an executable file into the windows environment and returns the task ID number that Windows assigns to each tunning program.
the first example loads and runs the program file WINWORD.EXE . it assumes that the file is in the default directory or in a directory specified by the path statement. because the mode is not specified , it uses the default mode of 2 ( minimized with focus )
Shell function constants of then mode% parameter
consant : value : Description
vbHide : 0 : Hides window with focus
vbNormalFocus : 1 : give window focus and restores ti to its original size and position.
vbMinimizedFocus : 2 : Minimizes and gives window focus
vbMaximizedFocus : 3 : Mazimizes and gives window focus
vbNormalNoFocus : 4 : Restores window to its original size and position with-out focus
vbMinimizedNoFocus : 6 : Minimizes window without focus.
No comments:
Post a Comment