VB6Runtime / Library / Interaction / app_activate

VB6 Library Reference

AppActivate Statement

Activates an application window — gives it the focus.

Syntax

AppActivate title[, wait]

Arguments

Remarks

Examples

Activating Notepad before sending keystrokes

AppActivate "Notepad"
SendKeys "Hello, world"

Using a Shell task ID

Dim taskId As Double
taskId = Shell("CALC.EXE", vbNormalFocus)
AppActivate taskId

See Also

← Back to Interaction | View all functions