Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to apply cntrl+p has shortcut key to print into my application.
Posted
Updated 5-Dec-13 1:06am
v2

Set KeyPreview property of your from to True

write code like this

VB
Public Sub Event (sender As Object, e As EventArgs) Handles Me.KeyUp
  If e.KeyCode = Keys.P AND e.Ctrl = True Then
    PrintIT()
  End Id
End Sub
 
Share this answer
 
 
Share this answer
 
1. Add a menu strip on your form.
2. Add a menu item, set shortcut key as CTRL+P.
3. write code on click event of that menu item.
4. set visibility of menu strip False.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900