SwitchToThisWindow(self.Handle,true);    第二个参数 为true 时  本窗口 不失去焦点。    

 

若第二个参数为 false 时。   对程序自身使用此函数时  窗体会失去焦点。

 

 

其他窗口应该都正常