[ Home ] [ Features ] [ Products ] [ FAQ's ] [ Screens ] [ Support ] [ Downloads ] [ About ] [ Discussion ]


the software that grows with you

 

V32ShellExecute()

Executes the WinApi's ShellExecute() function.

Syntax

V32ShellExecute( < cFile >, [ cVerb ], [ cParam ], [ cDir ], [ cState ], [ lModal ] )

Arguments

< cFile > is a character string containing the path and file name to be executed with its associated program. If this parameter is missing, no action is taken.

[ cVerb ] is the flag what type of action the associated program has to take. Default is 'open'. Windows defines default verbs as 'open', 'print', 'explore'. 

[ cParam ] a character string representing parameters to be passed to associated program. Default is empty string.

[ cDir ] optional directory path where the associated program searches for the required components.

[ cState ] can be on of the these: Hide, Normal, Minimized, Maximized, Show. Default is 'Normal'. This determines the state of associated program window.

[ lModal ] logical to determine whether the invoked program becomes the child process of the current application or the program flow return to application immediately after invoking the associated program. Default is FALSE means program flow returns immediately.

Returns 

NIL

Description

This function is useful to execute programs associated with a file extension. .PDF files can be invoked with Acrobat Reader, .Doc files can be opened with MS Word, and so on. You need not to worry about where the executables are placed.

Usage

function OpenSome()
local  cFile := CurDrive()+':\'+CurDir()+'\V32Demo.doc'

// Executes MSWord and opens V32Demo.doc in normal window
V32ShellExecute( cFile )

// Executes MSWord and opens V32Demo.doc in normal window and prints it
V32ShellExecute( cFile, 'print' )

// Executes MSWord and opens V32Demo.doc in the background and prints it
V32ShellExecute( cFile, 'print', , , 'hide' )

return nil

Tips
Please consult MSDN for possible usage of ShellExecute()
 

[ Home ][ Features ] [ Products ][ About Us ][ FAQ's ][ Screen Shots ][ Downloads ][ Support ][ Discussion ]
.

Vouch is a Trademark of Pritpal Bedi
All other Trade Marks are the property of their respective owners.
Copyright 1993-2011 Pritpal Bedi. All rights reserved.
Hit Counter  
You are Visitor # since 14 May 2002