Core Function GUICreate
From Sputnik Wiki
(Difference between revisions)
| Line 1: | Line 1: | ||
<pre> | <pre> | ||
| − | GUICreate( "Window", <Text>, <Left>, <Top>, <Width>, <Height> ) | + | GUICreate( "Window", <Text>, <Left>, <Top>, <Width>, <Height>, <Style> ) |
</pre> | </pre> | ||
| Line 23: | Line 23: | ||
==== height ==== | ==== height ==== | ||
Optional; The height of the object. | Optional; The height of the object. | ||
| + | |||
| + | ==== style ==== | ||
| + | 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 === | ||
Revision as of 16:20, 25 April 2012
GUICreate( "Window", <Text>, <Left>, <Top>, <Width>, <Height>, <Style> )
Contents |
Description
Create a GUI window
Parameters
text
The text (ie Title) the window should display.
left
LEFT Position to create the object.
top
TOP Position to create the object.
width
Optional; The width of the object.
height
Optional; The height of the object.
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 ); // Create a button -- This button will simply display a message $Button = GUICreate("Button", $GUI, "Press Me!", 8, 8); // Add a link to the button GUILink($Button, "Click", 'Moo();'); // Call function // Keep the GUI running as long as long as the window is open While ( GUIStatus( $GUI ) ) DoEvents( ); Function Moo() { MsgBox("Moo moo farm"); }