|
WindowHelperFindWindow Method |
Retrieves a handle to the top-level window whose class name and window name match the
specified strings. This function does not search child windows. This function does not
perform a case-sensitive search.
To search child windows, beginning with a specified child window, use the
function.
FindWindow function Namespace: Xcalibur.NativeMethods.V2.WindowsAssembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax [DllImportAttribute("user32.dll")]
public static IntPtr FindWindow(
string className,
string windowName
)
<DllImportAttribute("user32.dll">]
Public Shared Function FindWindow (
className As String,
windowName As String
) As IntPtr
public:
[DllImportAttribute(L"user32.dll")]
static IntPtr FindWindow(
String^ className,
String^ windowName
)
[<DllImportAttribute("user32.dll")>]
static member FindWindow :
className : string *
windowName : string -> IntPtr
Parameters
- className String
- The class name or a class atom created by a previous call to the
RegisterClass or RegisterClassEx function. The atom must be in the low-order word of
className; the high-order word must be zero.
If className points to a string, it specifies the window class name. The class name can be
any name registered with RegisterClass or RegisterClassEx, or any of the predefined
control-class names.
- windowName String
- The window name (the window's title). If this parameter is NULL,
all window names match.
Return Value
IntPtrIf the function succeeds, the return value is a handle to the window that has the
specified class name and window name. If the function fails, the return value is NULL. To
get extended error information, call .
See Also