Results 1 to 7 of 7

Thread: [RESOLVED] login form from another function

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    104

    Resolved [RESOLVED] login form from another function

    guys,
    I can easily use the input box method for taking the PIN. But that is not helping as INPUT method does not support password masking. So here it is:

    Code:
    Public Sub checkCard()
         Public Function Authenticate() As Integer
              If (pinVerification(userPIN)) Then
                    Return 1
              Else
              end if
    
    end Sub
    
    Public Function pinVerification(ByVal pin As String) As Boolean
    Dim message, title, defaultValue As String
            Dim passCode As Object
            ' Set prompt.
            message = "Enter the PIN code"
            ' Set title.
            title = "Authentication"
            defaultValue = ""   ' Set default value.
            ' Display message, title, and default value.
            passCode = InputBox(message, title, defaultValue) ---> This is where I want to make the change
            ' If user has clicked Cancel, set myValue to defaultValue 
            If passCode Like "" Then
                passCode = defaultValue
            End If
            'If passCode Like defaultValue Then
            'MsgBox("Wrong Passcode", MsgBoxStyle.OkOnly, "Alert!")
            'End If
            If (String.Compare(passCode, pin) = 0 And isLockeddown = False) Then
                Return True
            Else
                Return False
            End If
    end sub
    so, the function call and returns are the things that i want, but this should be also via a std form for password masking.

    any ideas??

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: login form from another function

    Follow the CodeBank link in my signature below and check out my WinForms Login thread.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    104

    Re: login form from another function

    Quote Originally Posted by jmcilhinney View Post
    Follow the CodeBank link in my signature below and check out my WinForms Login thread.
    can you give a link?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: login form from another function

    For me to provide you with a direct link, I would have to click the aforementioned CodeBank link in my signature and then look down the list of threads until I found the right one. Why are you any less able to do that than I am?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    104

    Re: login form from another function

    Quote Originally Posted by jmcilhinney View Post
    For me to provide you with a direct link, I would have to click the aforementioned CodeBank link in my signature and then look down the list of threads until I found the right one. Why are you any less able to do that than I am?
    ONLY a form comes and nothing else

  6. #6
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: login form from another function

    Then you probably didn't do something right. But since you didn't show us the code you DID try, it would be foolish for us to try and help.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 2017
    Posts
    104

    Re: login form from another function

    I just finished it all by myself!! Perfectly working!! Thanks for the help and response!!

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