如果大师的代码是你想要的效果,那你应该继续完善最小化、最大化事件。
afan 发表于 2016-4-17 11:10
还是A版考虑得周到
回复 14# chamlien
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Opt('GUIResizeMode', 1)
#region ### START Koda GUI section ### Form=e:\my file\源码\个人开发者审核\ie临时文件助手\form1.kxf
$Form1 = GUICreate("Form1", 785, 451, -1, -1, 0x00CF0000)
$Group1 = GUICtrlCreateGroup("Test", 12, 11, 520, 121)
$Input1 = GUICtrlCreateInput("Input1", 138, 40, 380, 23)
GUICtrlSetResizing(-1, $GUI_DOCKTOP + $GUI_DOCKLEFT + $GUI_DOCKHEIGHT)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_WINDOWPOSCHANGED, '_ChangeSize')
GUISetOnEvent($GUI_EVENT_RESTORE, '_ChangeSize')
GUISetOnEvent($GUI_EVENT_RESIZED, '_ChangeSize')
GUISetOnEvent($GUI_EVENT_MAXIMIZE, '_ChangeSize')
#endregion ### END Koda GUI section ###
GUISetOnEvent($GUI_EVENT_CLOSE, "_MainSwitch")
While 1
Sleep(100)
WEnd
Func _ChangeSize()
$pos = ControlGetPos($Form1, '', $Group1)
GUICtrlSetPos($Input1, $pos[0] + 126, $pos[1] + 29, $pos[2] - 140, 23)
EndFunc ;==>_ChangeSize
Func _MainSwitch()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
GUIDelete($Form1)
Exit
EndSwitch
EndFunc ;==>_MainSwitch
|