Method ActivateWindow
ActivateWindow(nint)
Declaration
public static void ActivateWindow(nint window)
Parameters
Type | Name | Description |
---|---|---|
nint | window |
ActivateWindow(IWindowHandle)
Activates the specified window by bringing it to the foreground.
Declaration
public static void ActivateWindow(IWindowHandle window)
Parameters
Type | Name | Description |
---|---|---|
IWindowHandle | window | The window handle to activate. |
Exceptions
Type | Condition |
---|---|
InvalidStateException | Thrown if the window fails to become the foreground window within the specified timeout. |
ActivateWindow(IWindowHandle, TimeSpan)
Activates the specified window by bringing it to the foreground.
Declaration
public static void ActivateWindow(IWindowHandle window, TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
IWindowHandle | window | The window handle to activate. |
TimeSpan | timeout | The maximum time allowed for the activation attempt. |
Exceptions
Type | Condition |
---|---|
InvalidStateException | Thrown if the window fails to become the foreground window within the specified timeout. |
ActivateWindow(IWindowHandle, TimeSpan, IFluentLog)
Activates the specified window by bringing it to the foreground.
Declaration
public static void ActivateWindow(IWindowHandle window, TimeSpan timeout, IFluentLog log)
Parameters
Type | Name | Description |
---|---|---|
IWindowHandle | window | The window handle to activate. |
TimeSpan | timeout | The maximum time allowed for the activation attempt. |
IFluentLog | log | The logger for capturing diagnostic information. |
Exceptions
Type | Condition |
---|---|
InvalidStateException | Thrown if the window fails to become the foreground window within the specified timeout. |