Visual Basic 6.0

Shodan

Tank
Joined
May 14, 2003
Messages
2,767
Reaction score
0
I am trying to learn VB6, and I am stuck with something,

I want to make a form, so when you start the program, it is disabled, somewhere on the form, I want to be able to open a new form, with a login, that activates the first form, is there a way to do this?

Thanks
 
Make your password form hidden. When the user presses a control or whatever on form1, put in form2.show to reveal the password form. If the password is entered correctly, then use form1.text1.enable or whatever to allow access to form1 controls.

There's cleaner and better ways of doing it, but this is cheap, cheerful and should work fine.
 
I'm not certain, but i think that the form has an enabled property, that can disable the whole form without the need to do each control.

Alternativly, you can loop through all forms in a loop, something like this:

for each control in form1.controls do
control.enabled = false
next

Btw. www.vbforums.com is a very good source of infomation, not just for VB either.
 
Back
Top