Results 1 to 3 of 3

Thread: Help - Configuration Form Effect!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2003
    Location
    Eden Prairie Minnesota
    Posts
    301

    Question Help - Configuration Form Effect!

    I Have a Configuration form for my Battle.net binary chat bot. When the Form loads, I Want all the Textboxes to Have ********* In place of the Letters/Numbers, But when you click on them, They Become Normlal, Is there anyway to do this WITHOUT Replacing the text? My friend said Something about Got Focus, and Lost Focus or something...

    p.s. Thanks in advance ;D

  2. #2
    Hyperactive Member Knowledge_is_Et's Avatar
    Join Date
    Dec 2001
    Location
    An Oak.
    Posts
    305
    the sub gotfocus is available, so that when you click on a textbox it gets the focus (when you type it goes into that)

    VB Code:
    1. Private Sub Text1_GotFocus()
    2.  
    3. End Sub
    Now returning to the world of VB. Please make sure your seatbelts are securely fastened and all trays are in their upright and locked position.

  3. #3
    Fanatic Member Illspirit's Avatar
    Join Date
    Mar 2001
    Location
    Blackpool, England
    Posts
    815
    Start a new project, put a text box called Text1 on the main form, and a couple of other controls so you can take focus away from it, and add this code:

    VB Code:
    1. Private Sub Form_Load()
    2.  
    3.     Text1_LostFocus
    4.    
    5. End Sub
    6. Private Sub Text1_GotFocus()
    7.  
    8.     Text1.PasswordChar = vbNullString
    9.  
    10. End Sub
    11. Private Sub Text1_LostFocus()
    12.    
    13.     Text1.PasswordChar = "*"
    14.    
    15. End Sub
    Illspirit - [email protected]

    SmartBarXP Lead Developer
    SmartBarXP - The leading desktop sidebar application for Microsoft Windows XP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width