Fr33b0w, This works for me:
#include <GUIConstantsEx.au3>
$hGUI = GUICreate("Toggle Working", 171, 699, -1, -1)
GUICtrlSetFont(-1, 8.5, 400, 0, "MS Shell Dlg", 5)
$oIE = ObjCreate("Shell.Explorer.2")
$hOntop = GUICtrlCreateButton("Set On Top", 102, 628, 61, 21)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $hOntop
If GUICtrlRead($hOntop) = "Set On Top" Then
WinSetOnTop($hGUI, "", 1)
GUICtrlSetData($hOntop, "Set NOT On Top")
Else
WinSetOnTop($hGUI, "", 0)
GUICtrlSetData($hOntop, "Set On Top")
EndIf
EndSwitch
WEnd
M23 Edit: Guten tag, KaFu. Ich war zu langsam heute!