Hello,
Quick question - I have attached an image of an app i'm working on. I don't want my end user to be able t exit my application with out a password. I added the following code, but when the user right clicks on the icon running in the system try and click exit, it prompts for password it you click okay without entering a password it exits. Any thoughts? Thanks
Quick question - I have attached an image of an app i'm working on. I don't want my end user to be able t exit my application with out a password. I added the following code, but when the user right clicks on the icon running in the system try and click exit, it prompts for password it you click okay without entering a password it exits. Any thoughts? Thanks
Code:
--assume the user enters a bad password correct_password = false; -- the 'correct' password real_passwords = {"pwd1", "pwd2", "pwd3"}; -- prompt the user to enter a password user_password = Dialog.PasswordInput("Password", "Please enter administrative password: ", MB_ICONQUESTION); -- compare the user's password to the 'correct' password. for j in real_passwords do if real_passwords[j] == user_password then correct_password = true; Application.Exit(); end end --if the password was bad, exit if not correct_password then Application.ExitScript(); end
Comment