Cancel Button in Print Preview
How do I assign the esc key to close my print preview dialog form.
I want to be able to quickly hit the esc key to close the form.
Code:
Dim EmployeeSummaryReport As PrintDocument
Dim dlgPreview As New PrintPreviewDialog
EmployeeSummaryReport = New PrintDocument
dlgPreview = New PrintPreviewDialog
AddHandler EmployeeSummaryReport.PrintPage, AddressOf EmployeeSummary
'dlgPreview.CancelButton =
dlgPreview.WindowState = FormWindowState.Normal
dlgPreview.StartPosition = FormStartPosition.Manual
dlgPreview.Height = 580
dlgPreview.Width = 780
dlgPreview.ShowDialog()
Thanks, Chris