Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the lparam value of key pressed . my function gets called on key press and i have the KeyPressEventArgs e . How can i get lparam from KeyPressEventArgs

I am using C#. So how can i get lparam value of key press in c#. Or does any one know how to do it in c++.
C#
void keyboardHook_KeyPress(object sender, KeyPressEventArgs e)
{
    string str = e.KeyChar.ToString();

}


[Edit]Code block added[/Edit]
Posted
Updated 7-Mar-13 22:17pm
v2
Comments
Jegan Thiyagesan 8-Mar-13 4:10am    
You can get the lpram value from winProc() function. but why would you need to get lpram of key pressed in C#? The key pressed event is there if you want to call a function when key pressed. also there are key down, key up events if you need so.

Jegan
Thomas Daniels 8-Mar-13 4:17am    
Not winProc() function, but WndProc() function.

Hi,
see the Microsoft link below for all keyboard input messages.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms645530%28v=vs.85%29.aspx[^]

Regards
Jegan
 
Share this answer
 
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900