应用程序失去焦点后,如果自动激活并最前显示(关键是获得键盘输入焦点)
使用了如下的众多语句仍不行:
application.BringToFront;
SetForegroundWindow(Form1.Handle);
ShowWindow(Form1.Handle,SW_SHOW);
BringWindowToTop(form1.Handle);
SwitchToThisWindow(form1.Handle,true);
application.RestoreTopMosts;
form1.SetFocus;