请教下,关于怎么写?
本人菜鸟,想请教下,关于怎么写,就是点击关于,弹出个框。最好有个实例。 回复 1# G,man。#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Example1()
Func Example1()
Local $msg,$form1
GUICreate("My GUI")
GUISetState(@SW_SHOW)
$form1=GUICtrlCreateButton("关于",200,100,100,40)
While 1
$msg = GUIGetMsg()
Switch $msg
Case $form1
MsgBox(4096, "关于", "这个消息框将会显示10秒", 10)
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndFunc
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 633, 454, -1, -1)
$MenuItem1 = GUICtrlCreateMenu("文件&(F)")
$MenuItem2 = GUICtrlCreateMenu("编辑&(E)")
$MenuItem3 = GUICtrlCreateMenu("查看&(V)")
$MenuItem4 = GUICtrlCreateMenu("帮助&(H)")
$fileitem41 = GUICtrlCreateMenuitem ("关羽(&G)",$MenuItem4)
$fileitem42 = GUICtrlCreateMenuitem ("张飞(&Z)",$MenuItem4)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $fileitem41
msgbox(0,"","这是关羽!")
case $fileitem42
msgbox(0,"","这是张飞!")
EndSwitch
WEnd
谢谢楼上两位了。
页:
[1]