小编Moh*_*sen的帖子

如何在Win 8中以编程方式在C#中按Alt + Tab

我在win8的VS 2013中使用此代码来模拟按Alt + Tab,但是什么也没有发生。我在Win 7和VS 2012中对其进行了测试,效果很好。

[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

private const byte VK_MENU = 0x12;
private const byte VK_TAB = 0x09;
private const int KEYEVENTF_EXTENDEDKEY = 0x01;
private const int KEYEVENTF_KEYUP = 0x02;

keybd_event(VK_MENU, 0xb8, 0, 0); //Alt Press 
keybd_event(VK_TAB, 0x8f, 0, 0); // Tab Press 
System.Threading.Thread.Sleep(70);
keybd_event(VK_TAB, 0x8f, KEYEVENTF_KEYUP, 0); // Tab Release 
keybd_event(VK_MENU, 0xb8, KEYEVENTF_KEYUP, 0); // Alt Releas
Run Code Online (Sandbox Code Playgroud)

如何在Win8中解决此问题?谢谢

c# keyboard wpf

6
推荐指数
1
解决办法
1278
查看次数

SQL Server 查找两列之间的链

我有一个这样的表:

from | to
-----+-----
 23  | 24
 24  | 25
 25  | 27
 27  | 30
 45  | 46
 46  | 47
 50  | 52
 53  | 60
Run Code Online (Sandbox Code Playgroud)

我需要一个 SQL Server 查询来检测链并返回每个链中的最小(从)和最大(到)(也是具有一条记录的链):

from | to
-----+-----
 23  | 30
 45  | 47
 50  | 52
 53  | 60
Run Code Online (Sandbox Code Playgroud)

sql-server

0
推荐指数
1
解决办法
1239
查看次数

标签 统计

c# ×1

keyboard ×1

sql-server ×1

wpf ×1