回复 6# netegg
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 623, 449)
GUISetOnEvent(-3,"exitfunc")
$Form2 = GUICreate("Form2",300,200,10,10,-1,0x00000040,$Form1)
GUISetState(@SW_SHOW,$Form1)
GUISetState(@SW_SHOW,$Form2)
GUIRegisterMsg(0x0112,"mymin")
While 1
Sleep(10)
WEnd
Func exitfunc()
Exit
EndFunc
Func mymin($hWnd, $iMsg, $iwParam, $ilParam)
If $hWnd = $Form2 And $iwParam = 0xF020 Then
$xywh = WinGetPos($Form1)
WinMove($Form2,"",$xywh[0]+10,$xywh[1]+400,150,24,2)
Return 0
EndIf
EndFunc
注册了消息,就不会出现原来的最过程,现在找不到方法让最小化按钮改成恢复按钮了 |