Ich habs mal umgeschrieben. Um das blaue um den Button zu entfernen müsstest du so wie ich mit 2 Fenstern arbeiten. Das Label wird durch den Button nämlich an der Stelle, wo der Button ist, verdrängt.
Spoiler anzeigen
#include <GUIConstants.au3> #include <Icons.au3>
#include <Misc.au3>
_GUICreate_Windows8("Windows 8", 600, 400, @SystemDir & "\shell32.dll", 47)
Func _GUICreate_Windows8($title, $width, $height, $seticon = @ScriptFullPath, $nm = 0, $bkcolor = 0xFFFFFF, $font = "Century Gothic")
$gui = GUICreate($title, $width, $height, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW)
GUISetBkColor(0x6BADF7)
GUICtrlCreateGraphic(6, 26, 588, 368)
GUICtrlSetBkColor(-1, $bkcolor)
GUICtrlSetState(-1, $GUI_DISABLE)
$Icon = GUICtrlCreateIcon("", 0, 6, 5, 16, 16)
_SetIcon($Icon, $seticon, $nm, 16, 16)
$exit = GUICtrlCreateLabel($title, 30, 0, 106, 26, BitOR($ES_LEFT, $SS_CENTERIMAGE))
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 11, 400, 1, "Century Gothic")
$exit = GUICtrlCreateLabel("x", 554, 0, 40, 20, BitOR($ES_CENTER, $SS_CENTERIMAGE))
GUICtrlSetBkColor(-1, 0xC84E50)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 11, 600, 1, "Century Gothic")
GUISetState()
$Button=GUICtrlCreateButton("Button",10,30)
While sleep(5)
$msg = GUIGetMsg()
$pos = GUIGetCursorInfo($gui)
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $exit
Exit
Case $Button
msgbox(48,"","")
Run("prog.exe")
EndSwitch
If _IsPressed("01") And $pos[1] < 26 And WinGetTitle("[active]") = $title Then
While _IsPressed("01")
$mpos = MouseGetPos()
WinMove($title, "", $mpos[0]-$pos[0], $mpos[1]-$pos[1])
WEnd
Else
If $pos[4] = $exit And PixelGetColor(555, 1, $gui) <> 0xE25C50 Then
GUICtrlSetBkColor($exit, 0xE25C50)
ElseIf $pos[4] <> $exit And PixelGetColor(555, 1, $gui) <> 0xC84E50 Then
GUICtrlSetBkColor($exit, 0xC84E50)
EndIf
EndIf
WEnd
EndFunc