I'll get right down to the point:
Make your program, and make everything that needs to be hidden inside
a panel.
Then, create your password field. (Note that it MUST be outside the panel!)
Which is:
A textbox
A button
To make people unable to see what you write in the textbox,
double click a empty spot within your program, so you get to the
onload event. Write
TextBox1.UseSystemPasswordChar = True
Then, double click your button, and in the onclick event, write
If TextBox1.Text = ("Thepassword") Then
Panel1.Show()
Else
MsgBox("Error: Invalid password")
End If
This is almost to easy to explain, but,
when the button is clicked, the program will check if the text in the
textbox is Thepassword, and if it is, it will show panel1.
But, if the password is not correct, the else statement will be run.
the result of that will be a messagebox popping up.
There is only one problem left though!
The panel will show by default!
There are two ways to do this, either by going to the panels properties,
and change visible to false, or, by going to the on load event.
I'll cover the onload event, because that way you'll most likely
understand more.
Double click on a empty place within your program.
Simply write
panel1.hide()
When the program loads (Or, starts) it will hide panel1, and everything
within it.
What if you want to hide it all again?
Simple, create another button, feel free to do it inside the panel.
Double click on it, and write
panel1.hide
This will simply hide it all, so that you will have to reenter the password.
How to make the password key configurable
with this, I mean, making the user able to decide if the textbox
should censor whats written there or not.
Add 2 buttons somewhere close to the textbox, like over it.
The first one, lets make it set the text to be X'es.
The second, will remove the X'es, so everyone can see whats being
written there.
Double click the first one, and write
TextBox1.UseSystemPasswordChar = True
And for the second one, write
TextBox1.UseSystemPasswordChar = False
This tutorial covers the very basic of password protection, and only supports
a preset password, which I suspect can easely be changed using hex
editing. But it covers the basics, to get you started, and thats
normaly what a guide should do, get you started.
I hope I managed to express myself correctly, and I hope this little, basic
guide was to any help.