我想是由于分辨率的原因吧, 怎样解决呢? 怎样让程序界面自动适应?
解决方案 »
- 求一个字符串转换的算法。自动加一个字符!
- 小白发帖问一不小白的问题~~~~~~~~~~~~~~~~~~~~~~
- Delphi调用VISA库时,如何读取双指针所反馈的值? 赠送10分
- 如何把在dbgrideh中修改的记录保存到另一个表中?
- copyfile可否多線程copy文件,如果可以怎樣做?僅有的40分全部給了。
- delphi7中tcpserver的多客户连接
- 关于listbox的操作,请帮忙看一下,在线等
- select 函数的返回值
- 一个简单问题!
- 小弟编了些小软件,有劳各位大虾帮我测试一下,在http://icnw.myrice.com ,我的作品中。
- 各位DELPHI的程序员们,问一个简单的问题~~
- 怎么这个sleep不行的?
http://expert.csdn.net/Expert/topic/1230/1230903.xml?temp=.4139215
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;