111,130
社区成员
发帖
与我相关
我的任务
分享
whd1 = FindWindow(null, "未命名 - 画图");
[DllImport("User32.dll")]
static extern int FindWindow(string strClassName, string strWindowName);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetForegroundWindow(IntPtr hWnd);
int whd1 = 0, whd2 = 0;
whd1 = FindWindow(null, "未命名 - 画图");
SetForegroundWindow(whd1);
Keys.SendWait("%F");
Keys.SendWait("A");
whd2 = FindWindow(null,"保存为");
SetForegroundWindow(whd2);
Keys.SendWait("c:\abc.jpg");
Kesy.SendWait("%S");