By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Making a print dialog close when pressing escape

P: n/a
Hi There,

I am using a PrintPreviewDialog and I would like it to close the print
preview dialog when I press the escape key.

What is the best way to do that?

I tried to make myself a new class that inherited the
PrintPreviewDialog, and then I tried to override the key methods
(OnKeyDown, OnKeyUp, OnKeyPress). That did absolutely nothing.

I also tried intercepting the key events with a delagate but that also
did nothing.

Your help would be appreciated.

Mar 13 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try overriding ProcessCmdKey and try catching the esc key there.

====================
Clay Burch
Syncfusion, Inc.

Mar 13 '07 #2

P: n/a
Try overriding ProcessCmdKey and catching the esc key there.

======================
Clay Burch
Syncfusion, Inc.

Mar 13 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.