回复 1# myloveqmx
这种问题不知道为什么,好是要重画窗口才能显示#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <WinAPI.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$Graphic1 = GUICtrlCreateGraphic(16, 16, 249, 183)
;~ GUICtrlSetGraphic($Graphic1, $GUI_GR_COLOR, 0xFF0000, 0x008000)
;~ GUICtrlSetGraphic($Graphic1, $GUI_GR_RECT, 14, 13, 217, 159)
$Button1 = GUICtrlCreateButton("画图", 48, 232, 97, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetGraphic($Graphic1, $GUI_GR_COLOR, 0xFF0000, 0x008000)
GUICtrlSetGraphic($Graphic1, $GUI_GR_RECT, 14, 13, 217, 159)
GUISetState (@SW_HIDE,$Form1)
GUISetState (@SW_SHOW,$Form1)
EndSwitch
WEnd
|