应用程序在windows2000 1024*768+16位色模式下编译通过,样子还不错,可是拿到800*600模式的
机器上使用时,窗口变大,屏幕无法显示容纳整个窗口,这个是为什么?
有什么方法可以解决吗?怎么办,怎么办…………………
机器上使用时,窗口变大,屏幕无法显示容纳整个窗口,这个是为什么?
有什么方法可以解决吗?怎么办,怎么办…………………
解决方案 »
- adoquery.locate是否有可能定位不到实际存在的数据?
- 给大家拜年,顺便问一个问题
- 跪求解决ADOConnection1.GetFieldNames遇到的问题,有截图的,大家帮忙看看啊~~~~
- 急·!怎么知道,当前控件,是不是db控件??
- StringGrid 动态改变行的颜色
- 这是什么意思
- 朋友们,一个不能再简单的小程序,调不通,救命
- 怎样用query返回一个数据库中的一个整数值并将它付给整形变量art????
- 关于关键字不能重复的问题
- 请教ActiveForm浏览器中的垂直滚动条。。。
- delphi里面有没有建临时table的功能啊。
- 如何用Winsock API发送邮件(支持SMTP身份验证)
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;
设置好分辨率!!!!!
看来我只能动态改变系统的分辨率了