Closing an application
-
Hi there, I have a VB based application (.exe) and when you choose to close the application, one window pops up and ask if you really want to close the application, with Yes/No options, My question is how can I add a code to ask for a hard coded pass word if we want to close the application. So that the user would need to add a password to actualy being able to close it. I have this part in my app.: Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer) If MsgBox("Are you sure you want to Exit DCS?", vbYesNo + vbQuestion, "DSC (Data Car Server)") = vbNo Then Cancel = True End If End Sub Thanks,
-
Hi there, I have a VB based application (.exe) and when you choose to close the application, one window pops up and ask if you really want to close the application, with Yes/No options, My question is how can I add a code to ask for a hard coded pass word if we want to close the application. So that the user would need to add a password to actualy being able to close it. I have this part in my app.: Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer) If MsgBox("Are you sure you want to Exit DCS?", vbYesNo + vbQuestion, "DSC (Data Car Server)") = vbNo Then Cancel = True End If End Sub Thanks,
-
Hi there, I have a VB based application (.exe) and when you choose to close the application, one window pops up and ask if you really want to close the application, with Yes/No options, My question is how can I add a code to ask for a hard coded pass word if we want to close the application. So that the user would need to add a password to actualy being able to close it. I have this part in my app.: Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer) If MsgBox("Are you sure you want to Exit DCS?", vbYesNo + vbQuestion, "DSC (Data Car Server)") = vbNo Then Cancel = True End If End Sub Thanks,
I don't think VB has any password Dialog Forms pre made so you would have to build a new form with a password box and pop it up when the unload event is raised. Then you can check the password with the hardcoded one. Kevin