窗体前端显示(ShowWindowAsync有许多优点)

H:=FindWindow('Tfrm_MainForm','aa');
  if H>0 then
  begin
    ShowWindowAsync(h,SW_MAX);
    SetForegroundWindow(h);
  end;

参考:http://m.blog.csdn.net/blog/fghydx/18708671

-------------------------------------------------------------------

ShowWindowAsync可以:
1. 避免死锁
2. 不需要管理进程窗口
3. ShowWindow函数对不是自己的窗口会有不可预料行为

参考:http://m.blog.csdn.net/blog/fghydx/22373577

posted @ 2015-08-18 17:42  findumars  Views(2244)  Comments(0)    收藏  举报