Click here to Skip to main content
11,922,641 members (56,923 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# .NET C#4.0 .NET4
What is dot(.) key keycode in ???

I am taking floating point numbers input from a textbox. Only number inputs i can take, but i have to apply backspace and dot(.) keys....[^]
Posted 27-Jul-12 22:28pm
Edited 27-Jul-12 23:19pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try the OemPeriod keycode which is 190.
For a full list, go to[^].
Member 9093981 28-Jul-12 4:06am
I use the code of ur link... But,

// Determine whether the keystroke is a backspace.
if (e.KeyCode != Keys.Back || e.KeyCode != Keys.OemPeriod )

portion does not work. Please tell me the reason....
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

In C# there is no method to find keycode, however we can find it using javascript.

For dot(./Period) keycode is 190.
Member 9093981 28-Jul-12 4:20am
how to detect keyboard detection in C#
Mohd Imran Saifi 28-Jul-12 4:41am
there is no method to find keycode in c#

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151125.1 | Last Updated 28 Jul 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100