var
  hform:hwnd;
begin
  hform:=findwindow(nil,'系统帮助');
  if   (hform=0)  then
     ShellExecute(0, 'Open', pchar('系统帮助.chm'), nil, nil, SW_SHOWNORMAl);
  else
    //把 系统帮助.chm‘ 放最前面。
请问如何把系'统帮助.chm' 放最前面。

解决方案 »

  1.   

    SetWindowPos(hform, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE) 
      

  2.   


      if IsIconic(hform) then
        ShowWindow(hform, SW_RESTORE);
      SetForegroundWindow(hform);
      

  3.   


    SetWindowPos(hform, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);
    SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE);
      

  4.   


    if SetWindowPos(hform,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE) then
         SetWindowPos(hform,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE);
      

  5.   

    if SetWindowPos(hform,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE) then
         SetWindowPos(hform,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE);