Core Function GUICreate
From Sputnik Wiki
(Difference between revisions)
m (1 revision) |
|||
| (6 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
<pre> | <pre> | ||
| − | GUICreate( "Window", <Text>, < | + | GUICreate( "Window", <Text>, <Width>, <Height>, <Left>, <Top>, <Style> ) |
</pre> | </pre> | ||
| Line 11: | Line 11: | ||
==== text ==== | ==== text ==== | ||
The text (ie Title) the window should display. | The text (ie Title) the window should display. | ||
| + | |||
| + | ==== width ==== | ||
| + | The width of the object. | ||
| + | |||
| + | ==== height ==== | ||
| + | The height of the object. | ||
==== left ==== | ==== left ==== | ||
| − | LEFT Position to create the object. | + | Optional; LEFT Position to create the object. |
| + | |||
| + | -1 Means centered | ||
==== top ==== | ==== top ==== | ||
| − | TOP Position to create the object. | + | Optional; TOP Position to create the object. |
| − | + | -1 Means centered | |
| − | + | ||
| − | ==== | + | ==== style ==== |
| − | Optional; The | + | Optional; The style of the window frame. |
| + | <pre> | ||
| + | 0 = None | ||
| + | 1 = Fixed Single | ||
| + | 2 = Fixed 3D | ||
| + | 3 = Fixed Dialog | ||
| + | 4 = Sizable (Default) | ||
| + | 5 = FixedToolWindow | ||
| + | </pre> | ||
=== Return Value === | === Return Value === | ||
| Line 37: | Line 52: | ||
// Show the GUI | // Show the GUI | ||
GUILoad( $GUI ); | GUILoad( $GUI ); | ||
| − | |||
| − | |||
| − | |||
| − | |||
// Keep the GUI running as long as long as the window is open | // Keep the GUI running as long as long as the window is open | ||
While ( GUIStatus( $GUI ) ) DoEvents( ); | While ( GUIStatus( $GUI ) ) DoEvents( ); | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] | ||
Latest revision as of 12:37, 14 June 2015
GUICreate( "Window", <Text>, <Width>, <Height>, <Left>, <Top>, <Style> )
Contents |
Description
Create a GUI window
Parameters
text
The text (ie Title) the window should display.
width
The width of the object.
height
The height of the object.
left
Optional; LEFT Position to create the object.
-1 Means centered
top
Optional; TOP Position to create the object.
-1 Means centered
style
Optional; The style of the window frame.
0 = None 1 = Fixed Single 2 = Fixed 3D 3 = Fixed Dialog 4 = Sizable (Default) 5 = FixedToolWindow
Return Value
Success: Returns the new GUI object.
Failure: Returns 0 if error occurs.
Example
// Create the GUI $GUI = GUICreate("Window", "Hello", 200, 200); // Show the GUI GUILoad( $GUI ); // Keep the GUI running as long as long as the window is open While ( GUIStatus( $GUI ) ) DoEvents( );