6 Replies - 2552 Views - Last Post: 01 July 2009 - 09:10 AM Rate Topic: -----

#1 maheen123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-June 09

how can print a document using keyboard shortcut in vb.net

Post icon  Posted 29 June 2009 - 08:09 AM

Hi!

i have built a form application in vb.net... now i want to use keyboard shortcut CTRl+P for printing a report from the form... how can i do this.. what event shoud i need to do and how.. please help me.. its urgernt
Is This A Good Question/Topic? 0
  • +

Replies To: how can print a document using keyboard shortcut in vb.net

#2 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 465
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: how can print a document using keyboard shortcut in vb.net

Posted 29 June 2009 - 12:51 PM

in menu editor there is a shortcut option

other way to do it
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
	Select Case KeyCode
		Case vbKeyF2
			something 
	End Select
End Sub






but................................ no more help if you dont send code :(
Was This Post Helpful? 0
  • +
  • -

#3 firebolt  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 5,561
  • Joined: 20-February 09

Re: how can print a document using keyboard shortcut in vb.net

Posted 30 June 2009 - 01:28 AM

Are you saying that your code is VB.NET? If so, this is the wrong forum.
Was This Post Helpful? 0
  • +
  • -

#4 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 465
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: how can print a document using keyboard shortcut in vb.net

Posted 30 June 2009 - 03:16 AM

oh demn :D that is true
Was This Post Helpful? 0
  • +
  • -

#5 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1201
  • View blog
  • Posts: 7,309
  • Joined: 07-September 06

Re: how can print a document using keyboard shortcut in vb.net

Posted 30 June 2009 - 07:51 AM

Moved to VB.net
Was This Post Helpful? 0
  • +
  • -

#6 firebolt  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 5,561
  • Joined: 20-February 09

Re: how can print a document using keyboard shortcut in vb.net

Posted 30 June 2009 - 11:03 PM

Thanks Beta.

You may need to look for ASCII codes and determine when this type of key is pressed, then something will happen. Assuming that you actually have something close to what you want, look here for ASCII codes so when they are triggered, your function will be enabled.
http://www.scotek.de...o.uk/ascii.html
Was This Post Helpful? 0
  • +
  • -

#7 juunas  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 87
  • Joined: 25-March 09

Re: how can print a document using keyboard shortcut in vb.net

Posted 01 July 2009 - 09:10 AM

The other method is to have a menustrip in the application, and make a print option in the menu. You can then just set shortcut to it. Then just make the printing code in the menuitem's Click event.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1