Core Function DoEvents
From Sputnik Wiki
(Difference between revisions)
(→Example) |
(→Example) |
||
| Line 26: | Line 26: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
| − | + | // Create the MDI GUI | |
| − | + | $GUI = GUICreate("Window", "GUI", 800, 600); | |
| + | // Show the MDI GUI | ||
| + | GUILoad( $GUI ); | ||
| − | // | + | // Keep the GUI running as long as long as the window is open |
| − | + | While ( GUIStatus( $GUI ) ) DoEvents( ); | |
| − | + | ||
| − | + | ||
| − | + | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] | ||
Revision as of 09:33, 28 March 2012
DoEvents( )
Contents |
Description
Keep GUI window active by dispatching all messages in the queue.
Works similar to Visual Basic 6.0's DoEvents().
Parameters
None
Return Value
Success: Returns 1.
Failure: Returns 0 if window/control is not found.
Remarks
Its worth noting the thread that created the GUI objects will need to be the one sending the DoEvents() for its objects.
Example
// Create the MDI GUI $GUI = GUICreate("Window", "GUI", 800, 600); // Show the MDI GUI GUILoad( $GUI ); // Keep the GUI running as long as long as the window is open While ( GUIStatus( $GUI ) ) DoEvents( );