#include #include #include Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Testform", 521, 358, 320, 188) GUISetOnEvent($GUI_EVENT_CLOSE, "_Close_main") $Mainmenu = GUICtrlCreateMenu("Main") $M_setwindowpos = GUICtrlCreateMenuItem("Set window Pos", $Mainmenu) $M_close = GUICtrlCreateMenuItem("Quit", $Mainmenu) GUISetOnEvent(-1, "_Close_main") GUISetState(@SW_SHOW) While 1 Sleep(200) WEnd func M_setwindowpos() MsgBox(4096, "Why am i not showing?", "test") EndFunc func _Close_main() sgBox(4096, "Why am i not showing?", "test") Exit EndFunc