API Documentation > CorelDRAW > 2025-v26 > AppWindow > IVGAppWindow
AppWindow.Handle property
Gets the window handle
Syntax:
Property Get Handle() As Long
Remarks:
The Handle property returns the window handle value of the main application window. The value can be used with calls to Windows API functions that require handles.
Examples:
The following VBA example shows a message using the Windows API function, MessageBox, and specifying the CorelDRAW window as the parent to the message box.
Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" _
(hwnd As Long, lpText As String, _
lpCaption As String, wType As Long) As Long Sub Test()
MessageBox AppWindow.Handle, "Some Message", "Some Caption", 64 
End Sub