本帖最后由 C.L 于 2010-5-23 22:31 编辑
挺有意思的GUI
看了下代码,按楼主的要求改了一下,源代码有点长,我只贴了更改的部份代码:
1、增加一个函数_ControlReset ()Func _ControlReset ()
GUICtrlSetPos($Button1,8,24,40,35)
GUICtrlSetPos($Button2,8,70,40,35)
GUICtrlSetPos($Button3,8,115,40,35)
GUICtrlSetPos($Button4,8,161,40,35)
GUICtrlSetPos($Button5,8,207,40,35)
EndFunc
2、注释掉源码主循环中所有这两行代码(每个$button都有):
_ControlChange($Form1, $Button1, 0, 30, 3, 0, 0, 1, 0)
_ControlChange($Form1, $Button1, 1, 30, 3, 0, 0, 1, 0)
3、在每个If GUIGetMsg() = $Buttonx Then位置后插入代码,如:If GUIGetMsg() = $Button1 Then
_ControlReset ()
_ControlChange($Form1, $Button1, 0, 30, 3, 0, 0, 1, 0)
....................
If GUIGetMsg() = $Button2 Then
_ControlReset ()
_ControlChange($Form1, $Button2, 0, 30, 3, 0, 0, 1, 0)
............
If GUIGetMsg() = $Button5 Then
_ControlReset ()
_ControlChange($Form1, $Button5, 0, 30, 3, 0, 0, 1, 0)
其他的地方不用修改。 |