Thursday, October 21, 2010

How do I password protect this program in vb?

OK, i have created a web browser in vb, when I logon I want it to say 'hello welcome to the webbrowser, please type in password' and then it will have an input box for user to put password in (lets say the password was happy) what is the exact coding i need to do this?How do I password protect this program in vb?
using inputbox is easy, if not make a new form and design it how you like.



Public Function InputBox( _

ByVal Prompt As String, _

Optional ByVal Title As String = ';';, _

Optional ByVal DefaultResponse As String = ';';, _

Optional ByVal Xpos As Integer = -1, _

Optional ByVal YPos As Integer = -1 _

) As String



password = ';happy';

message = ';hello welcome to the webbrowser, please type in password';

title = ';Password prompt';

myValue = InputBox(message, title)

If myValue Is password Then

'do stuff

else

'end program or what ever

end

endif

No comments:

Post a Comment