我的显示器是17'的,但把Delphi程序用15'的显示器显示就不能完全显示,就是说我的程序不能适应不同的显示器,怎么解决这个问题?请赐教。
解决方案 »
- serersocket多线程重复接收数据,全天在线,急,急!!!
- 关闭指定QQ号进程
- sql语句保存stringgrid表数据
- 求TSYNMemo控件,哪位哥哥有啊
- 关于联通短信发送单音铃声的问题,有一点眉目了,可是..
- 文件改名同时也改变其扩展名,方法好分可加
- delphi开发多窗口IE时.如何实现每新打开一个窗口自动动像腾讯的浏览器一样,在地址楼下面给出窗口的链接.
- delphi中的数据库问题,在线等!
- DateTimePicker的显示格式问题
- 又一个有关程序在win98与win2000下运行令我几个月不得安宁的问题...
- SkinEngine是免费的吗
- "Row cannot be located for updating"??
另外设计控件的align属性设置时麻烦更大,不是到了大显示器上窗体出现空白,就是某些控件变的很大。
自己写代码控制很麻烦
如果borland在IDE中提供了这样的功能多好啊,期待delphi8.0中有这样的功能
inplementation
const
ScreenWidth: LongInt = 800; {I designed my form in 800x600 mode.}
ScreenHeight: LongInt = 600;{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
begin
scaled := true;
if (screen.width <> ScreenWidth) then
begin
height := longint(height) * longint(screen.height) div ScreenHeight;
width := longint(width) * longint(screen.width) div ScreenWidth;
scaleBy(screen.width, ScreenWidth);
end;
end;下一步,要讓每個子控制的字体改變到合适的大小:
type
TFooClass = class(TControl); { needed to get at protected }
{ font property }var
i: integer;
begin
for i := ControlCount - 1 downto 0 do
TFooClass(Controls[i]).Font.Size :=
(NewFormWidth div OldFormWidth) *
TFooClass(Controls[i]).Font.Size;
end;