可能lz 的思路需要在解析成不同的步骤
1 当前激活的窗体,是系统那个应用程序,
[DllImport("user32.dll")]
public static extern int GetForegroundWindow(); // 获取激活窗体句柄
2 应用程序是否是特定的应用程序
StringBuilder title = new StringBuilder (50);
[DllImport("user32.dll")]
public static extern int GetWindowText(int hWnd, StringBuilder text, int count); // 获取应用程序的标题到 title
3 如果是notepad.exe
if (title.ToString().Contains("记事本"))
{
// 该拷贝的拷贝,发送键盘 ctrl + v 的发送...随意处理
}