View Single Post
  #2 (permalink)  
Old September 30th, 2003, 10:05 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 71,632, Level: 100
Points: 71,632, Level: 100 Points: 71,632, Level: 100 Points: 71,632, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,013
Thanks: 79
Thanked 1,576 Times in 1,553 Posts
Default

Hi Thomaz,

You can check for \t (tab) and \r (enter) instead of numeric values. This:
Code:
if (e.KeyChar == '\t' || e.KeyChar == '\r')
{
    MessageBox.Show("Tab or Enter pressed");
}
should do the trick.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote