回复 3# jamer
#include <GUIConstantsEx.au3>
$Form1_1 = GUICreate("Form1", 298, 100, 450, 339)
$Input1 = GUICtrlCreateInput("password", 20, 16, 137, 21)
$label1 = GUICtrlCreateLabel("原文", 20, 50, 147, 21)
$Button2 = GUICtrlCreateButton("显示", 240, 16, 49, 73)
$Dummy = GUICtrlCreateDummy()
GUISetState(@SW_SHOW)
Local $Key[1][2] = [["{Enter}", $Dummy]]
GUISetAccelerators($Key)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
GUICtrlSetData($label1, GUICtrlRead($Input1))
Case $Dummy
Local $aResult = DllCall("user32.dll", "hwnd", "GetFocus")
If $aResult[0] = GUICtrlGetHandle($Input1) Then
GUICtrlSetData($label1, GUICtrlRead($Input1))
EndIf
EndSwitch
WEnd
|