Andi
January 3rd, 2005, 09:56 AM
....next question....
hi all,
-- in my MainForm method i am creating a dialog.
-- if the user clicks OK (in this dialog), everything´s fine...the application goes on
-- if the user clicks the Cancel button ==> i call Application.Exit() and anything will be closed - fine!
-- but if the user presses Alt+F4, the dialog closes but the application will start....
==> what i want:
if the user clicks Alt+F4, the same must happen as clicking the Cancel button
>>>>
so
a) how to catch an key event (must i add a key handler to the dialog form if yes, HOW)?
b) how can i catch the X (the icon in the very right edge up) event?
thanx a lot,
andi
hi all,
-- in my MainForm method i am creating a dialog.
-- if the user clicks OK (in this dialog), everything´s fine...the application goes on
-- if the user clicks the Cancel button ==> i call Application.Exit() and anything will be closed - fine!
-- but if the user presses Alt+F4, the dialog closes but the application will start....
==> what i want:
if the user clicks Alt+F4, the same must happen as clicking the Cancel button
>>>>
so
a) how to catch an key event (must i add a key handler to the dialog form if yes, HOW)?
b) how can i catch the X (the icon in the very right edge up) event?
thanx a lot,
andi