View Single Post
  #2 (permalink)  
Old September 30th, 2003, 11:05 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,960
Thanks: 79
Thanked 1,559 Times in 1,536 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