Password characters to an InputBox?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vb6
    New Member
    • Jan 2007
    • 1

    Password characters to an InputBox?

    Hi , I need to enter a passsword to an InputBox but the char. need to be in password char. Please assist.

    Thanks.Happy Hoildays
  • nDaKota
    New Member
    • Jan 2007
    • 7

    #2
    It's not possible to do it in an input box.
    Just create a your own input box for that password entry...

    Comment

    • dwadish
      New Member
      • Nov 2006
      • 129

      #3
      [QUOTE]
      the question is not clear.
      what do you mean ? is it do you want to pass value through an inputbox. it is possible. get value from inputbox variable and check it with your value"password" .
      [/QOUTE]

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by vb6
        Hi , I need to enter a passsword to an InputBox but the char. need to be in password char. Please assist.
        The InputBox function does not support the "password masking" feature. The textbox control does, by setting the PasswordChar property. If you need it to appear in a popup window like the InputBox, just place your textbox on a separate form and show that.

        Comment

        • jaketrimble
          New Member
          • Jan 2007
          • 14

          #5
          [html]<input name="mypass" type="password" />[/html]

          Comment

          • niernier
            New Member
            • Mar 2008
            • 2

            #6
            'PUT BELOW DECLARATIONS IN A .BAS MODULE

            [CODE=vb]Option Explicit

            Private Declare Function FindWindow Lib "user32" Alias _
            "FindWindow A" (ByVal lpClassName As String, _
            ByVal lpWindowName As String) As Long

            Private Declare Function FindWindowEx Lib "user32" Alias _
            "FindWindow ExA" (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&)

            Private Declare Function KillTimer& Lib "user32" _
            (ByVal hwnd&, ByVal nIDEvent&)

            Private Declare Function SendMessage Lib "user32" Alias _
            "SendMessag eA" (ByVal hwnd As Long, ByVal wMsg As Long, _
            ByVal wParam As Long, lParam As Any) As Long

            Const EM_SETPASSWORDC HAR = &HCC
            Public Const NV_INPUTBOX As Long = &H5000&


            Public Sub TimerProc(ByVal hwnd&, ByVal uMsg&, _
            ByVal idEvent&, ByVal dwTime&)

            Dim EditHwnd As Long


            EditHwnd = FindWindowEx(Fi ndWindow("#3277 0", App.Title), _
            0, "Edit", "")

            Call SendMessage(Edi tHwnd, EM_SETPASSWORDC HAR, Asc("*"), 0)
            KillTimer hwnd, idEvent
            End Sub







            `TO USE THE CODE WITHIN A FORM, USE THE MAGIC CODE
            `SetTimer hwnd, NV_INPUTBOX, 10, AddressOf TimerProc
            [/CODE]

            <example:>
            SetTimer hwnd, NV_INPUTBOX, 10, AddressOf TimerProc
            pass = InputBox("Enter Password")


            REMEMBER TO ALWAYS PUT THE MAGIC CODE BEFORE CALLING THE INPUTBOX FUNCTION.
            Last edited by Killer42; Mar 7 '08, 01:28 AM. Reason: Added CODE=vb tag

            Comment

            • Killer42
              Recognized Expert Expert
              • Oct 2006
              • 8429

              #7
              Thanks for that, niernier.

              I haven't tried it out, but it looks like quite a neat solution to the problem.

              Comment

              • niernier
                New Member
                • Mar 2008
                • 2

                #8
                It's been my problem before so i just want to share how it was solved. It's been a year though before I posted an answer to the question. I am new here, so that explains it. And thank you for adding code tags! haha i forgot the tags. Anyway, is there a forum here for the Assembly language?I have a question to ask also . . .

                Comment

                • Killer42
                  Recognized Expert Expert
                  • Oct 2006
                  • 8429

                  #9
                  Originally posted by niernier
                  It's been my problem before so i just want to share how it was solved. It's been a year though before I posted an answer to the question. I am new here, so that explains it. And thank you for adding code tags! haha i forgot the tags. Anyway, is there a forum here for the Assembly language?I have a question to ask also . . .
                  No, we don't have an Assembly forum. But you could try the Miscellaneous Questions forum, or the Software Development one.

                  Comment

                  • mafaisal
                    New Member
                    • Sep 2007
                    • 142

                    #10
                    Hello,

                    Thanx niernier
                    I am also searching For It
                    Thanx For ur Posting

                    Faisal

                    Originally posted by niernier
                    'PUT BELOW DECLARATIONS IN A .BAS MODULE ...
                    Last edited by Killer42; Mar 10 '08, 01:57 AM. Reason: Reduced quote block

                    Comment

                    Working...