你可以把FORM的属性 position:=poScreenCenter就可以了,在属性框就可以中设置.

解决方案 »

  1.   

    将TForm的Position属性设为poScreenCenter
      

  2.   

    MainForm.Top:=(Screen.Height-Height) Div 2;
      MainForm.Left:=(Screen.Width-Width) Div 2;
      

  3.   

    hxshanji(洪兴山鸡),我是这样写的,
    TForm的Position属性设为poScreenCenter先起作用,去掉后,你的方法有效,但把我的窗口缩小了,变形后才居中,帮我看看,这样是否不对?为什么要 div 2,
    我现在屏幕是800*600,但给我变得很小了,不会用了640*480吧?Form1.Top:=(Screen.Height-Height) Div 2;
    Form1.Left:=(Screen.Width-Width) Div 2;
      

  4.   

    在窗体的formresize中写:Top:=(Screen.Height-Height) Div 2;
    Left:=(Screen.Width-Width) Div 2;或者用工作区域居中Top:=(Screen.workareHeight-Height) Div 2;
    Left:=(Screen.workareWidth-Width) Div 2;div是整除的意思!
      

  5.   

    他们都回答了怎么居中但是没有回答怎么才能够放大到最大,修改form的align属性为alClient就可以了,给分哦!!不给分以后不跟你玩了!
      

  6.   

    更惨了,用了你的修改form的align属性为alClient,然后在
    procedure TmainForm.FormCreate(Sender: TObject);
    begin
    Top:=(Screen.WorkAreaHeight-Height) Div 2;
    Left:=(Screen.WorkAreaWidth-Width) Div 2;
    end;哪效果真是叫人气死哟,我的工具栏和状态栏都缩到了自定义状态,还是得把
    把FORM的属性 position:=poScreenCenter。好,给你们加分,但我是初学Delphi,初到CSDN,以后可能麻烦你们的事可多了。
      

  7.   

    form.position:=poScreenCenter

    form.position:=poDesktopCenter