Recognitions:
Gold Member

## VB6 Help

I made a simple lock program which is always ontop of other programs, I've removed all the controls from the form such as the cross button, it can only be closed by entering a password. The form can still be resized though so people can still use the computer. To get around this I tryed using the scalewidth and scalehigh options to resize it to full screen.

Code:
form1.scalewith = 11400
form1.scalehight = 15000
This is in a timer as a simple way rather than check it has been resized by the user. I can't get thecode to work though, even in something like a command button.

Can anyone work out where I'm going wrong?

thanks

 PhysOrg.com science news on PhysOrg.com >> 'Whodunnit' of Irish potato famine solved>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change>> Curiosity Mars rover drills second rock target

Recognitions:
Gold Member
 Quote by madmike159 I made a simple lock program which is always ontop of other programs, I've removed all the controls from the form such as the cross button, it can only be closed by entering a password. The form can still be resized though so people can still use the computer. To get around this I tryed using the scalewidth and scalehigh options to resize it to full screen. Code: form1.scalewith = 11400 form1.scalehight = 15000 This is in a timer as a simple way rather than check it has been resized by the user. I can't get thecode to work though, even in something like a command button. Can anyone work out where I'm going wrong? thanks
Just load the form with the vbModal keyword:

Code:
form1.Show vbModal
Then change the form properties as follows:

Code:
BorderSytle = Fixed Dialog
ControlBox = False
Moveable = False
This will create a pop-up form that will prevent them from doing anything until they enter the correct password. Of course the code for the correct password should unload the form as well as do whatever else you want it to.

Hope this helps.

CS

 so your saying that the program wont even shut down with the task manager or with alt + f4?

Recognitions:
Gold Member