4. System Classes : FrameExec Class : IsMaximized Attribute : How to Change the IsMaximized Setting While a Frame is Invisible
 
Share this page                  
How to Change the IsMaximized Setting While a Frame is Invisible
For example, you create a frame with a button field labeled "Invisible and maximize" and named "invisible." When a user clicks the button, it runs the following code:
initialize=
{
}
on click invisible =
{
curframe.WindowVisibility = WV_INVISIBLE;
curframe.SendUserEvent(eventname = 'domaximize', delay = 4);
}
on userevent 'domaximize' =
{
curframe.isMaximized = TRUE;
tgl = curframe.IsMaximized;
curframe.SendUserEvent(eventname = 'dovisible', delay = 4);
}
on userevent 'dovisible' =
{
curframe.Trace('dovisible');
curframe.WindowVisibility = WV_VISIBLE;
}
When the frame is run and the user clicks the "invisible" button, the unmaximized frame disappears. A few seconds later the frame appears in the maximized state.