窗体 borderstyle 为 bsnone,窗体最大化时,如果任务栏设置成自动隐藏,鼠标移到屏幕下方,任务栏也不能弹出。
有没有办法解决这个问题?

解决方案 »

  1.   

    窗体不要使用最大化了,手动设置窗体大小吧。SetBounds(0,0,screen.Width ,screen.Height - 4);
      

  2.   

    procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    begin
      if Y>=Screen.Height-1 then Self.SendToBack;
    end;
      

  3.   

    如果可以的话,在底部加一个 Panel, 在 Panel 的 OnMouseMove 里面处理……
      

  4.   


    这个效果不好,sendtoback后,会显示其它运用程序的窗口。
      

  5.   

    道理是一样的procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    var
      H: hWnd;
    begin
      if Y>=Screen.Height-1 then begin
        H := FindWindow('Shell_TrayWnd', nil);
        if H<>0 then Windows.BringWindowToTop(H);
      end;
    end;
      

  6.   

    procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, 
      Y: Integer); 
    var 
      H: hWnd; 
    begin 
      if Y>=Screen.Height-1 then begin 
        H := FindWindow('Shell_TrayWnd', nil); 
        if H <>0 then Windows.BringWindowToTop(H); 
      end; 
    end;五楼的正解,一般都是这么处理的。
      

  7.   

    把任务栏隐藏先
    FindWindow('Shell_TrayWnd', nil);