The Current and Main Windows
In command handlers or filters, to get access to the current window or to the main window use properties #Com_Owner.avCurrentWindow or #Com_Owner.avMainWindow. These are immediately accessible #VF_SY154 object references to the current and main windows respectively.
For example, if you put this code into any filter or command handler it will display the current and main window location:
Use Message_box_Add ('The current window named' #Com_Owner.avCurrentWindow.WindowName 'is at position' #Com_Owner.avCurrentWindow.Top #Com_Owner.avCurrentWindow.Left)
Use Message_box_Add ('The main window named' #Com_Owner.avMainWindow.WindowName 'is at position' #Com_Owner.avMainWindow.Top #Com_Owner.avMainWindow.Left)
Use message_box_show
Like this example:
Important Note: Always free #VF_SY154 object references in your programs.