Previous Document Next Document
AppWindow.Handle

Property Handle As Long

Member of AppWindow

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.

The Handle property returns a read-only value.

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.