Job98456

 
HomeCalendarFAQSearchRegisterLog in
Post new topic   Reply to topic
 

VBScripting Solutions: An Improved GUI Component for Data Entry

View previous topic View next topic Go down 
AuthorMessage
raj_mmm9




Age : 45
Joined : 08 Mar 2008
Posts : 1850

PostSubject: VBScripting Solutions: An Improved GUI Component for Data Entry   Sun 6 Apr - 12:59

By default, the InputBox object is simply a box that can collect plaintext. To make it work for passwords (i.e., to make it hide the typed text), you must set the Password property to True or a nonzero value, as in

dlg.Password = true
The property defaults to False. When you've properly configured the InputBox object, you use the Show method, which Listing 3 shows, to display the dialog box. The Show method in Vbs- Input.InputBox takes no argument and returns a string value that contains the contents of the input buffer. Figure 2 shows the resulting dialog box. If the user clicks Cancel in this dialog box, the method returns an empty string. You can use the Text property to access the contents of the input buffer:

MsgBox "You typed: " & dlg.Text
Listing 4 shows the complete script for generating a password-entry text box. The overall behavior of the component doesn't change significantly whether the component is working in password or normal mode. The only real difference is in how the typed text appears: as clear text or hidden by a sequence of asterisks. . . .
Back to top Go down

VBScripting Solutions: An Improved GUI Component for Data Entry

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
Job98456 :: Data Entry-
Post new topic   Reply to topic