private void button2_Click(object sender, EventArgs e)
{
System.Diagnostics.Process myProcess = System.Diagnostics.Process.Start(@"E:\网店管家(企业版)2.1\cc.exe");
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
myProcess.WaitForInputIdle(10000);
SearchWindow();
// SendKeys.SendWait("{Enter}");
}
private void SearchWindow()
{
IntPtr ParenthWnd = new IntPtr(0);
IntPtr EdithWnd = new IntPtr(0);
IntPtr Con = new IntPtr(0);
IntPtr pw = new IntPtr(0);
//查到窗体,得到整个窗体
ParenthWnd = FindWindow("TForm_login", "电话服务平台【登陆】");//用spy++这个软件可以得到(TForm_login)类名和电话服