在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
public partial class Form1 : Form { [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern short GetAsyncKeyState(Keys vKey); public Form1() { InitializeComponent(); } private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.ShiftKey) { if (Convert.ToBoolean(GetAsyncKeyState(Keys.LShiftKey))) MessageBox.Show("Left"); if (Convert.ToBoolean(GetAsyncKeyState(Keys.RShiftKey))) MessageBox.Show("Right"); } } }
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论