110,534
社区成员
发帖
与我相关
我的任务
分享
[DllImport("coredll.dll", EntryPoint = "GetKeyState")]
public static extern int GetKeyState(int nVirtKey);
public const int VK_SHIFT = 0x10;
public const int VK_0 = 0x30;
public const int VK_1 = 0x31;
public const int VK_A = 0x41;
//if ((GetKeyState(VK_0) & 0x30) == 0x30)-----怎么判断我输入的是数字且为1
// {
// 是数字
//}
//if ((GetKeyState(VK_A) & 0x30) == 0x41)
// {
// 是字母
//}