Making a print dialog close when pressing escape

P

peter.mcclymont

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.
 
C

ClayB

Try overriding ProcessCmdKey and try catching the esc key there.

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

ClayB

Try overriding ProcessCmdKey and catching the esc key there.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top