Results 1 to 6 of 6

Thread: Inputbox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    28

    Question

    Thank you for reading!

    Do you know how can i put a password mask in
    a InputBox? Is there any API capable to do that?

    ThankX....

  2. #2
    Guest
    there is a property called PasswordChar for that.

    best regards

    Sascha

  3. #3
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Are you talking about about a text box? if so then
    Code:
    Text1.PasswordChar = "*"
    will do the trick, or just go down in the textbox prperties untill you see "PasswordChar" Then type the mask that you want in there. (ie. *)

    Hope that helped,
    D!m
    Dim

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Angry

    Sergio_campos is talking about an InputBox!

    NOT a textbox!
    Mark
    -------------------

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?> Input Box Char Prompt

    Code:
    'set the input of an input box to password characters
    
    
    '---bas module code-- 
    
    Option Explicit 
    
    Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long 
    
    Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long 
    
    Public Declare Function SetTimer& Lib "user32" (ByVal hwnd&, ByVal nIDEvent&, ByVal uElapse&, ByVal lpTimerFunc&) 
    
    Public Declare Function KillTimer& Lib "user32" (ByVal hwnd&, ByVal nIDEvent&) 
    Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long 
    Public Const NV_INPUTBOX As Long = &H5000& 
    Public Const EM_SETPASSWORDCHAR = &HCC 
    Public Sub TimerProc(ByVal hwnd&, ByVal uMsg&, ByVal idEvent&, ByVal dwTime&) 
        Dim myHwnd As Long 
    'Change here App.Title (defoult InputBox Caption) into your caption 
        myHwnd = FindWindowEx(FindWindow("#32770", App.Title), 0, "Edit", "") 
         Call SendMessage(myHwnd, EM_SETPASSWORDCHAR, 42, 0) 
        KillTimer hwnd, idEvent 
    End Sub 
    
    '--Using - form code: 
    Private Sub Command1_Click() 
    Dim sPass As String 
    SetTimer hwnd, NV_INPUTBOX, 10, AddressOf TimerProc 
    sPass = InputBox("Set Password") 
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    28
    it worked fine. ThanX HeSaidJoe!!!

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