如何獲得當前鍵盤的NumLock,CapsLock,Insert等的狀態? http://www.personalmicrocosms.com/html/kssbdemo.html 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 [DllImport("user32.dll")]private static extern int GetKeyState (int nVirtKey); private void button1_Click(object sender, System.EventArgs e){ //取Caps Lock的状态 int iKeyState=GetKeyState(VK_CAPITAL); if (iKeyState==0) { Console.WriteLine("Caps Lock关闭"); } else { Console.WriteLine("Caps Lock打开"); } } combobox1中的items 高手速来~~~~~~~~~~~~~~ 求助,求平均值 已知cookie,如何将其附加到webrequest上? 请问对象的实例化,所需分配的内存空间是在编译期还是运行期分配? 使用C# Socket 发送协议包,应该使用那个方法,help! mdi窗体中的问题,进者给分, 水晶报表的问题 [求助]帮我看看这个webservice吧,怎么样接收和返回对象数组? 请问一个正则表达式的问题 在线等!!!着急!!! 又是索引超出!急啊 有谁告诉我C#中的随杨函数是什么?谢 了。
private static extern int GetKeyState (int nVirtKey);
private void button1_Click(object sender, System.EventArgs e)
{ //取Caps Lock的状态
int iKeyState=GetKeyState(VK_CAPITAL); if (iKeyState==0)
{
Console.WriteLine("Caps Lock关闭");
}
else
{
Console.WriteLine("Caps Lock打开");
}
}