折腾了一下,"WM_COMMAND"也可以,
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GUIConstants.au3>
#include <EditConstants.au3>
Opt("GUIOnEventMode", 1)
Global $Form1, $Edit1, $ZEdit1, $TEMP, $TEMP1, $Input1;, $AInput1, $Pic, $FormS3
$TEMP = "编辑框控件Edit1"
$xtkjn = "关于" & $TEMP & @CRLF _
& "此功能目前仅支持Access2007版本的数据库!" & @CRLF _
& "请谨慎使用本功能!本程序会自动备份数据库" & @CRLF _
& "因使用本功能造成的损失由使用者自行承担," & @CRLF _
& "作者不承担任何责任." & @CRLF _
& "欢迎大家一起研究其他的版本的密码查看方法" & @CRLF
$TEMP1 = "编辑框控件 ZEdit1"
$xtkjn1 = "关于" & $TEMP1 & @CRLF _
& "此功能目前仅支持Access2007版本的数据库!" & @CRLF _
& "请谨慎使用本功能!本程序会自动备份数据库" & @CRLF
Example()
While 1
Sleep(100)
WEnd
Func _Exit()
GUIDelete()
Exit
EndFunc ;==>_Exit
Func btnMinClick()
WinSetState($Form1, "", @SW_MINIMIZE)
EndFunc ;==>btnMinClick
Func Example()
$Form1 = GUICreate("编辑框控件", 540, 490, -1, -1)
GUISetBkColor(0x007180)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$Edit1 = GUICtrlCreateEdit("", 8, 40, 525, 210, BitOR($ES_WANTRETURN, $ES_AUTOVSCROLL, $WS_VSCROLL, $ES_MULTILINE))
GUICtrlSetFont(-1, 11, 400, 0, 'Arial')
GUICtrlSetColor(-1, 0xFF00007F)
GUICtrlSetBkColor(-1, 0xEEE9D8)
GUICtrlSetLimit(-1, 999999999);设置控件的字符或象素数量限制
$ZEdit1 = GUICtrlCreateEdit("", 10, 260, 525, 220, BitOR($ES_WANTRETURN, $ES_AUTOVSCROLL, $WS_VSCROLL, $ES_MULTILINE))
GUICtrlSetBkColor(-1, 0xEEE9D1)
GUICtrlSetFont($ZEdit1, 12, 400, 0, "微软雅黑")
$Input1 = GUICtrlCreateInput('AAAAAA', 8, 10, 350, 20)
GUICtrlSetColor(-1, 0x990000)
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
GUISetState(@SW_SHOW, $Form1)
GUICtrlSetData($Edit1, $xtkjn)
GUICtrlSetData($ZEdit1, $xtkjn1)
EndFunc ;==>Example
Func WM_COMMAND($hWndGUI, $MsgID, $wParam, $lParam)
#forceref $hWndGUI, $MsgID
Local $hWndFrom, $iIDFrom, $iCode
$hWndFrom = $lParam
$iIDFrom = BitAND($wParam, 0xFFFF)
$iCode = BitShift($wParam, 16)
Switch $iIDFrom
Case $Input1
If GUICtrlRead($Input1) = "" Then
Else
If BitShift($wParam, 16) = 0x100 Then MsgBox(0, "提示Input1", GUICtrlRead($Input1))
EndIf
Case $Edit1
If GUICtrlRead($Edit1) = "" Then
Else
If BitShift($wParam, 16) = 0x100 Then MsgBox(0, "提示Edit1", GUICtrlRead($Edit1))
EndIf
Case $ZEdit1
If GUICtrlRead($ZEdit1) = "" Then
Else
If BitShift($wParam, 16) = 0x100 Then MsgBox(0, "提示ZEdit1", GUICtrlRead($ZEdit1))
EndIf
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
|