Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let InputIsPasseword not working after dialog created #10

Open
Nicolas2067 opened this issue Dec 3, 2024 · 1 comment
Open

Let InputIsPasseword not working after dialog created #10

Nicolas2067 opened this issue Dec 3, 2024 · 1 comment

Comments

@Nicolas2067
Copy link

Hi, and thanks a lot for this amazing program

I use a verification check to toggle "show in clear/show black dot" in a password dialog
But Let InputIsPasseword don't modify the inputbox

Mr Microsoft says : https://learn.microsoft.com/en-us/windows/win32/controls/edit-control-styles

After the control has been created, these styles cannot be modified, except as noted.

Seems to be necessary to use the SendMessage EM_SETPASSWORDCHAR
So I modify the Let InputIsPasseword this way

Public Property Let InputIsPassword(bVal As Boolean)
If hEditBox Then
    If bEditPassword <> bVal Then
        If bVal Then
            SendMessageW hEditBox, EM_SETPASSWORDCHAR, 9679, 0&    '9679 for blackdot, else Asc("whatEverYouWant")
        Else
            SendMessageW hEditBox, EM_SETPASSWORDCHAR, 0&, 0&
        End If
        SetFocusAPI hEditBox 'necessary to get the change visible
    End If
End If
bEditPassword = bVal
End Property
@fafalone
Copy link
Owner

fafalone commented Dec 5, 2024

Thanks, I'll merge this change in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants