Navigation:  thinBasic Modules > OS (Operating System) >

OS_ShellExecute

Previous pageReturn to chapter overviewNext page

 

Description

 

Performs an operation on a specified file. The OS_ShellExecute function opens or prints a specified file. The file can be an executable file or a document file.

 

Syntax

 

n = OS_ShellExecute(Operation, File, Parameters, Directory, ShowCmd)

 

Returns

 

 

 

Parameters

 

Name

Type

Optional

Meaning

Operation

String

No

A string specifying the operation to perform. This string can be "open" or "print".

File

String

No

A string specifying the file to open

Parameters

String

No

A string specifying parameters passed to the application when the File parameter specifies an executable file. If File is a string specifying a document file, this parameter is an empty string.

Directory

String

No

a string specifying the default directory.

ShowCmd



0Hides the window and passes activation to another window.
1Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position (same as 9).
2Activates a window and displays it as an icon.
3Activates a window and displays it as a maximized window.
4Displays a window in its most recent size and position. The window that is currently active remains active.
5Activates a window and displays it in its current size and position.
6Minimizes the specified window and activates the top-level window in the system's list.
7Displays a window as an icon. The window that is currently active remains active.
8Displays a window in its current state. The window that is currently active remains active.
9Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position (same as 1).

 

Remarks

 

Restrictions

 

See also

 

Windows API reference, OS_Shell

 

Examples

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com