iam trying to write a code for when caps lock is on tooltip display.
i want total code in c#.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pramod Kumar NandagiriPosted Sep 12, 2009, 2:35 AM
Master BillaPosted Sep 11, 2009, 12:42 PM
Yes you can write a global function and work with P/Invoke to get caps lock is on/off.
Just copy this code add one ur main class and call where u need.
[DllImport("user32.dll", ExactSpelling=true)]
internal static extern ushort GetKeyState(uint nVirtKey);
internal const byte VK_CAPITAL = 0x14;
if(0 != (GetKeyState(VK_CAPITAL) & 1))
{
// do whatever here
}
http://www.codeproject.com/KB/system/NetKeyLogger.aspx?msg=2653396
Thank you