How can i do a short key for a printing action?
I already have this.
I don't know what comes inside of the if{}
if (keyData == (Keys.Control | Keys.P))
{
drucken_Click();
}
private void drucken_Click(object sender, EventArgs e)
{
PrintDialog printDialog = new PrintDialog();
PrintDocument printDocument = new PrintDocument();
printDialog.Document = printDocument;
printDocument.PrintPage += new PrintPageEventHandler (PrintReceiptPage);
DialogResult result = printDialog.ShowDialog();
if (result == DialogResult.OK)
{
printDocument.Print();
}
}