Desktop X & Y
BlitzPlus Forums/BlitzPlus Beginners Area/Desktop X & Y
| ||
| Hi Everyone, Is there a command to get the desktop x & y value from the desktop. Apologies, I have not used Blitz in along time and can't seem to find anything under the obvious help categories. Thank you in advance. |
| ||
| EDITED: Is there anyway to close a child window of a GUI that is border-less? EDITED2: SOLVED I used FreeGadget().
;MapEditor
;Varaibles
Version$ = "V.0.0.1"
;Initalize
MapEditor = CreateWindow("MapEditor" + Version$, 0, 0, 1024, 600)
;Main Loop
Repeat
WindowEvent()
Forever
;Functions
Function WindowEvent()
If WaitEvent(100000) = $803 Then
WindowClose()
EndIf
End Function
Function WindowClose()
CloseProgram = CreateWindow("Close Program?", 512 - 150, 300 - 150, 300, 300, MapEditor, 0)
CreateLabel("Are you sure you want to close the program?", 50, 25, 250, 25, CloseProgram)
ButtonYes = CreateButton("Yes", 75, 75, 50, 50, CloseProgram)
ButtonNo = CreateButton("No", 175, 75, 50, 50, CloseProgram)
Repeat
If WaitEvent(100000) = $201 Or $2001 Then
ActivateWindow(CloseProgram)
If EventSource() = ButtonYes Then
End()
ElseIf EventSource() = ButtonNo Then
;HERE IS THE PROBLEM
EndIf
EndIf
Forever
End Function
Last edited 2011 Last edited 2011 Last edited 2011 |
| ||
| The answer to your original question: You can get the desktop screen/width with the commands GadgetWidth(Desktop()) GadgetHeight(Desktop()) |