Visual Basic (Declaration) | |
---|---|
Public MustOverride ReadOnly Property WindowHandle As Integer |
C# | |
---|---|
public abstract int WindowHandle {get;} |
This property returns the Microsoft Windows handle (the hWnd
) of the main application window. You can use this value in any Win32 API call to manipulate the window. For example, you may want to call a Win32 function to raise, lower, resize, or minimize the application window.
Note that until the application has been made visible, there is no window and hence no window handle. This property will return 0 until such time that the application has been made visible.
Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)