如何让form只能居中显示 就是在屏幕中间显示啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 form有一个position属性的(不太记得了,一年多没用了:)),你可以设置为desktopcenter 设置position的属性为poScreenCenter。 //... private procedure WMNCHITTEST(var Msg: TWMNCHitTest); message WM_NCHITTEST; end;//...implementation//...procedure TForm1.WMNCHITTEST(var Msg: TWMNCHitTest);begin inherited; if (HTCAPTION = Msg.Result) then msg.Result := HTCLIENT;end;procedure TForm1.FormResize(Sender: TObject);begin Left := (Screen.Width - Width) div 2; Top := (Screen.Height - Height) div 2;end;procedure TForm1.FormCreate(Sender: TObject);begin FormResize(Sender);end;//... 设置position的属性为poScreenCenter。如果,窗体拖动后想居中,则自己写程序 设置 Left := (Screen.Width - Width) div 2; Top := (Screen.Height - Height) div 2; 设置position的属性为poScreenCenter。 设置position的属性为poScreenCenter。 设置position的属性为poScreenCenter。如果,窗体拖动后想居中,则自己写程序 设置 Left := (Screen.Width - Width) div 2; Top := (Screen.Height - Height) div 2; 请大家帮忙,关于截获串口数据问题,请教高手 handle ,null,nil,0 彪哥,一路走好。。。。。。 各位大侠帮帮小弟我用OLE控件嵌了一个EXCEL表格想对数据做一下控制! 我的程序为什么在关闭后出现错误? 关于网络路径映射为物理路径问题: 适时捕捉F1键,大家一起来探讨!看谁的点子very good!! 大家救我! TMemoryStream和TFileStream在装入数据的速度上有没有区别? Lazarus 写的软件需要开源吗?? delphi 在2000下设计的程序界面到98就变了?怎么办 Delphi6有Bug,用WebBrowser浏览网页出错!
private
procedure WMNCHITTEST(var Msg: TWMNCHitTest); message WM_NCHITTEST;
end;
//...
implementation
//...
procedure TForm1.WMNCHITTEST(var Msg: TWMNCHitTest);
begin
inherited;
if (HTCAPTION = Msg.Result) then msg.Result := HTCLIENT;
end;procedure TForm1.FormResize(Sender: TObject);
begin
Left := (Screen.Width - Width) div 2;
Top := (Screen.Height - Height) div 2;
end;procedure TForm1.FormCreate(Sender: TObject);
begin
FormResize(Sender);
end;
//...
如果,窗体拖动后想居中,则自己写程序 设置 Left := (Screen.Width - Width) div 2;
Top := (Screen.Height - Height) div 2;
如果,窗体拖动后想居中,则自己写程序 设置 Left := (Screen.Width - Width) div 2;
Top := (Screen.Height - Height) div 2;