Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using password character "*" in InputBox

Tags:

vb.net

I want to use * character in inputbox but an error prompts

conversion from "*" to string invalid 

How can I make my inputbox hide typed text into password characters?

Here is my code

Dim value As String
value = InputBox("Security Check", " Enter password", "*")

If value = "123456" Then
    numr.Enabled = True
End If
End Sub 
like image 426
user2780962 Avatar asked Nov 01 '22 14:11

user2780962


1 Answers

This is not possible with the built in Function InputBox. Ths value you are setting "*" is the defaultvalue of that function. http://msdn.microsoft.com/en-us/library/6z0ak68w(v=vs.90).aspx

Here is something you could do. http://www.vbforums.com/showthread.php?627996-Accepting-password-characters-for-InputBox-function

like image 193
idlehands23 Avatar answered Nov 15 '22 07:11

idlehands23