Compartilhar via


IVsUIShell.SetForegroundWindow Method

Definition

Activates the environment application window by calling the SetForegroundWindow Win32 API.

public:
 int SetForegroundWindow();
public:
 int SetForegroundWindow();
int SetForegroundWindow();
public int SetForegroundWindow ();
abstract member SetForegroundWindow : unit -> int
Public Function SetForegroundWindow () As Integer

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user.

Applies to