#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 269, 111, 192, 114)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$i2 = GUICtrlCreateInput("", 80, 50, 150, 21,$ES_CENTER)
$i1 = GUICtrlCreateInput("", 80, 80, 150, 21, BitOR($ES_CENTER, $ES_PASSWORD))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
If GUICtrlRead($i1)="" Then
GUICtrlSetStyle($i1,$ES_LEFT)
Else
GUICtrlSetStyle($i1,$ES_CENTER)
EndIf
If GUICtrlRead($i2)="" Then
GUICtrlSetStyle($i2,$ES_LEFT)
Else
GUICtrlSetStyle($i2,$ES_CENTER)
EndIf
Sleep(200)
WEnd
Func Form1Close()
Exit
EndFunc
不知道这个代码能否达到你的要求? |