大家好:
    我想使应用程序全屏显示,包括显示时间的状态栏。请高手们指教。

解决方案 »

  1.   

    SetBounds(0,0,Screen.Width, Screen.Height);
      

  2.   

    全屏:
      Height := screen.height;
      Width := screen.width;
      Position :=poScreenCenter;
    如果用wsMaximized的话覆盖不了任务栏的区域.
      

  3.   

    不知楼主用的上不procedure hideTaskbar;   //隐藏 
    var wndHandle : THandle;
    wndClass : array[0..50] of Char;
    begin
    StrPCopy(@wndClass[0], 'Shell_TrayWnd');
    wndHandle := FindWindow(@wndClass[0], nil);
    ShowWindow(wndHandle, SW_HIDE);
    End;
    procedure showTaskbar;        //显示
    var wndHandle : THandle;
    wndClass : array[0..50] of Char;
    begin
    StrPCopy(@wndClass[0], 'Shell_TrayWnd');
    wndHandle := FindWindow(@wndClass[0], nil);
    ShowWindow(wndHandle, SW_RESTORE);
    end;
      

  4.   

    下面是我收集的,你可以试试看
    //这是我的代码,我尝试了 n 种方法以后得出的结论是这种方法最好:procedure TFormMain.SetIsFullScreen(value: boolean);
    Const
      OldWindowState  : TWindowState = wsNormal;
      VisibleStatusBar: boolean = true;
      OldWindowStyle  : integer = 0;
    begin
      if value then
      begin
        LockWindowUpdate(Handle);
        OldWindowState  := WindowState;
        VisibleStatusBar:= StatusBar.Visible;    StatusBar.Visible:= false;
        CoolBar.Visible  := false;
        PanelFullScreen.Visible := true;    OldWindowStyle:= GetWindowLong(Handle, GWL_STYLE);
        SetWindowLong(Handle, GWL_STYLE, OldWindowStyle and Not(WS_CAPTION));
        Height:= Height - GetSystemMetrics(SM_CYCAPTION);
        WindowState:= wsNormal;
        WindowState:= wsMaximized;    LockWindowUpdate(0);
      end
      else
      begin
        LockWindowUpdate(Handle);    StatusBar.Visible:= VisibleStatusBar;
        PanelFullScreen.Visible := false;
        Coolbar.Visible  := true;
        WindowState      := OldWindowState;
        SetWindowLong(Handle, GWL_STYLE, OldWindowStyle);
        Height:= Height + GetSystemMetrics(SM_CYCAPTION);    if Visible then SetFocus;
        LockWindowUpdate(0);
      end;
    end;