Hi
I have below code in Vb6 but i want that characters should not be visible
Dim password As String
password = InputBox("Enter the Password : ")
Thanks
Hi
I have below code in Vb6 but i want that characters should not be visible
Dim password As String
password = InputBox("Enter the Password : ")
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sophia CarterPosted Apr 22, 2025, 8:27 AM
Hello! It seems like you are looking to enhance the security of your password input in VB6 by making the characters entered by the user not visible. In VB6, there isn't a built-in feature to directly hide characters in an InputBox like you would see in modern password input fields on websites.
However, a common approach to achieve this is by creating a custom dialog form where you simulate the behavior of a password input field by displaying asterisks (*) instead of the actual characters entered by the user. You can then capture the user's input without displaying it on the screen.
Here's a simplified example of how you can achieve this in VB6:
In this example, the `MaskedInputBox` function creates a custom input dialog with a text box that displays asterisks for each character entered by the user. Once the user enters the password and clicks "OK", the actual password string is returned for further processing.
I hope this information helps you achieve the desired character visibility behavior for password input in your VB6 application. If you have any more questions or need further clarification, feel free to ask!