ALX
Well-known member
I'm trying to handle the KeyDown event for the PrintPreviewDialog without success.
'Have done all of the usual... The PrintPreviewDialog has been added to the form as "WithEvents"... The event handling routine ...
...But it doesn't catch the event. I added
thinking that would help... No such luck! MSDN doesn't provide any insights....
Any ideas ???
'Have done all of the usual... The PrintPreviewDialog has been added to the form as "WithEvents"... The event handling routine ...
VB.NET:
Private Sub PrintPreviewDialog1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles PrintPreviewDialog1.KeyDown
If e.KeyCode = Keys.Escape Then PrintPreviewDialog1.Close()
End Sub
VB.NET:
PrintPreviewDialog1.KeyPreview = True
Any ideas ???