|
发表于 2015-6-2 11:40:45
|
显示全部楼层
回复 6# macran
这样你试试
;------------------------------------------------------------
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Global $Form1, $menu_C2, $GroupBox1, $Label
GUI_D()
While 1
Sleep(10)
WEnd
Func GUI_D()
;$Form2 = GUICreate("关于", Default, Default, 305, 155, Bitor($WS_CAPTION,$WS_SYSMENU))
$Form1 = GUICreate("", 320, 180, 302, 218, BitOR($WS_CAPTION, $WS_SYSMENU))
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$GroupBox1 = GUICtrlCreateGroup("", 8, 8, 305, 155)
$Label = GUICtrlCreateLabel("", 16, 16, 290, 140)
$menu_C = GUICtrlCreateContextMenu($Label);创建上下文菜单(右键)
$menu_C1 = GUICtrlCreateMenuItem("移动", $menu_C);创建一个菜单项目控件
$menu_C2 = GUICtrlCreateMenuItem("关闭", $menu_C);创建一个菜单项目控件
GUICtrlSetOnEvent($menu_C2, "_menu_C2")
$Label2 = GUICtrlCreateLabel("版本", 16, 48, 28, 17)
$Label4 = GUICtrlCreateLabel("备注", 16, 78, 28, 17)
$Label3 = GUICtrlCreateLabel("版权", 16, 108, 28, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
;$Button2 = GUICtrlCreateButton("移动", 84, 180, 75, 25, 0);移动” 和“关闭”
;$Button3 = GUICtrlCreateButton("关闭", 184, 180, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
EndFunc ;==>GUI_D
Func Form1Close()
Exit
EndFunc ;==>Form1Close
Func _menu_C2()
Exit
EndFunc ;==>_menu_C2 |
|