I don't know how you would disable "end task" from closing your program, but
I have no idea why you'd want to do that....When all else fails, you need a
way to close the program *somehow.*
Anyways, just add a handler for the Windows_Closing event in your main form
that sets the "Cancel" property to true
private void MainForm_Closing(object sender, CancelEventArgs e)
{
e.Cancel = myKeyStrokeWasPressed;
}
where myKeyStrokeWasPressed is a bool you'd set to false if, say,
Shift-Ctrl-Q was pressed. Otherwise, it's true.
"Dev" <ra********@hotmail.com> wrote in message
news:e5**************@TK2MSFTNGP11.phx.gbl...
Dear Friends,
I have created Application using VC#.
How do to the following tasks?
The user should not be allowed to exit the program: the start menu, end
task and all other ways of exiting the program should be
disabled. The Shift+Ctrl+Q (or other keystroke combination) should be the
only way to exit the program.
I disabled the close button.
If anyone knows ....Please help me....
Any suggestions would be greatly appreciated....
Thanks,
Rajan