| 1 | #include <GUIConstantsEx.au3>
|
|---|
| 2 | #include <GuiEdit.au3>
|
|---|
| 3 | #include <MsgBoxConstants.au3>
|
|---|
| 4 | #include <EditConstants.au3>
|
|---|
| 5 | #include <WindowsConstants.au3>
|
|---|
| 6 |
|
|---|
| 7 | Example()
|
|---|
| 8 |
|
|---|
| 9 | Func Example()
|
|---|
| 10 |
|
|---|
| 11 | ; create example GUI
|
|---|
| 12 | Local $hGUI = GUICreate('Example', 300, 150, -1, 100)
|
|---|
| 13 |
|
|---|
| 14 | ; create Edit
|
|---|
| 15 | Local $idText = GUICtrlCreateEdit('', 5, 10, 280, 80)
|
|---|
| 16 | ; set CueBanner text to the Edit control
|
|---|
| 17 | _GUICtrlEdit_SetCueBanner($idText, 'Type the text here...... ')
|
|---|
| 18 |
|
|---|
| 19 | ; create Input
|
|---|
| 20 | Local $idPassword = GUICtrlCreateInput('', 5, 95, 280, 25)
|
|---|
| 21 | ; set CueBanner text to the Input control
|
|---|
| 22 | _GUICtrlEdit_SetCueBanner($idPassword, 'Enter password here.')
|
|---|
| 23 |
|
|---|
| 24 | ; create some other button
|
|---|
| 25 | Local $idClose = GUICtrlCreateButton('&Close', 210, 120, 85, 25)
|
|---|
| 26 | ControlFocus($hGUI, '', $idClose)
|
|---|
| 27 |
|
|---|
| 28 | ; show the GUI
|
|---|
| 29 | GUISetState(@SW_SHOW, $hGUI)
|
|---|
| 30 |
|
|---|
| 31 | ; check CueBanner text for $idPassword
|
|---|
| 32 | MsgBox($MB_SYSTEMMODAL, '_GUICtrlEdit_GetCueBanner()', 'Return Value = ' & _GUICtrlEdit_GetCueBanner($idPassword))
|
|---|
| 33 |
|
|---|
| 34 | ; Loop until the user exits.
|
|---|
| 35 | While 1
|
|---|
| 36 | Switch GUIGetMsg()
|
|---|
| 37 | Case $GUI_EVENT_CLOSE, $idClose
|
|---|
| 38 | ExitLoop
|
|---|
| 39 |
|
|---|
| 40 | EndSwitch
|
|---|
| 41 | WEnd
|
|---|
| 42 |
|
|---|
| 43 | ; CleanUp
|
|---|
| 44 | GUIDelete($hGUI)
|
|---|
| 45 | EndFunc ;==>Example
|
|---|