User32IsGuiThread Method

Determines whether the calling thread is already a GUI thread.

It can also optionally convert the thread to a GUI thread.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", EntryPoint = "IsGUIThread", SetLastError = true)]
public static bool IsGuiThread(
	bool convertToGuiThread
)

Parameters

convertToGuiThread  Boolean
If this value is , and if the thread is not a GUI thread, converts the thread to a GUI thread.

Return Value

Boolean
The function returns value in the following situations:

• If the calling thread is already a GUI thread.

• If convertToGuiThread is and the function successfully converts the thread to a GUI thread.

Otherwise, the function returns .

Remarks

See Also