How to assign key board values to buttons in form

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2007
Posts: 5
Reputation: sreenathvp is an unknown quantity at this point 
Solved Threads: 0
sreenathvp sreenathvp is offline Offline
Newbie Poster

How to assign key board values to buttons in form

 
0
  #1
Dec 5th, 2007
Eg: Calculator

How to assign numbers in key board to corresponding buttons in the calculator?
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 23
Reputation: poonams is an unknown quantity at this point 
Solved Threads: 0
poonams's Avatar
poonams poonams is offline Offline
Newbie Poster

Re: How to assign key board values to buttons in form

 
0
  #2
Dec 6th, 2007
hi
U Can write the code on keypress event of button.First u have to get the Ascii value of keys of keyboard.then write the code

if asc(e.keypress)=13 then
//ur code
endif

here 13 is value for Enter.

Hope it wil help u
All the best
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 3
Reputation: chewmp is an unknown quantity at this point 
Solved Threads: 0
chewmp chewmp is offline Offline
Newbie Poster

Re: How to assign key board values to buttons in form

 
0
  #3
Dec 6th, 2007
normally i use keydown


Private Sub btnPost_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnPost.KeyDown

Select case e.keyCode
case keys.u
lblKey.text = "U"
End Sub

Hope this is useful for you
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 5
Reputation: sreenathvp is an unknown quantity at this point 
Solved Threads: 0
sreenathvp sreenathvp is offline Offline
Newbie Poster

Re: How to assign key board values to buttons in form

 
0
  #4
Dec 8th, 2007
How to get ascii values for all keys in keyboard??
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: How to assign key board values to buttons in form

 
0
  #5
Dec 8th, 2007
check this link
http://www.asciitable.com/
but i give the ascii table too.

hope this usefull
Attached Thumbnails
asciifull.gif  
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC