Name

Shell Function — Microsoft.VisualBasic.Interaction

Synopsis

Shell(pathname[,style][, Wait][, Timeout] )
pathname required; String

Name of the program to execute

style optional; AppWinStyle enumeration

The style of window and whether it receives the focus; its default value is AppWinStyle.MinimizedFocus.

Wait optional; Boolean

Boolean indicating whether to wait for the pathname application to finish execution before continuing execution of subsequent code; its default value is False.

Timeout optional; Integer

If Wait is True, number of milliseconds to wait for the pathname application to terminate before the Shell function times out. Its default value is -1 indicating that there is no timeout value.

Return Value

An Integer representing the Process ID, or 0

Description

Launches another application and, if successful, returns that application’s task ID.

Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.