C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Keyboard CapsLock On/OFF


Posted Date: 23 Aug 2008    Resource Type: Articles    Category: General

Posted By: Ramesh Narayan       Member Level: Gold
Rating:     Points: 7



This article shows how to check it out wheather the Keyboard CapsLock,NumLock,ScrollLock On/OFF and also toggle the caps lock


private void Form1_Load(object sender, EventArgs e)
{
if (Control.IsKeyLocked(Keys.CapsLock))
{
listBox1.Items.Add("CapsLock ON");

}
else
{
listBox1.Items.Add("CapsLock OFF");

}

if (Control.IsKeyLocked(Keys.NumLock))
{
listBox1.Items.Add("NumLock ON");
}
else
{
listBox1.Items.Add("NumLock OFF");
}

if (Control.IsKeyLocked(Keys.Scroll))
{
listBox1.Items.Add("ScrollLock ON");
}
else
{
listBox1.Items.Add("ScrollLock OFF");
}

}

private void button1_Click(object sender, EventArgs e)
{
keybd_event(0x14, 0x45, KEYEVENTF_EXTENDEDKEY, (UIntPtr)0);
keybd_event(0x14, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
(UIntPtr)0);
}


For more details, visit




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Authenticating usernames and passwords from database
Previous Resource: The effect of mobile phone radiation
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use