const
ScreenWidth: LongInt = 800;
ScreenHeight: LongInt = 600;var
FWidth:integer;
begin
//适应分辨率的变化
if (screen.width <> ScreenWidth) then
begin
FWidth:=Width;
scaled := true;
Font.Size:=(screen.Width DIV screenWidth)*Font.Size;
scaleBy(screen.width, ScreenWidth);
height := longint(height) * longint(screen.height) div ScreenHeight;
width := longint(width) * longint(screen.width) div ScreenWidth; end;
问题:当窗体的borderstyle属性 为bsSizeable是可以实现按比例放大,当窗体的borderstyle属性其余的属性时,运行的结果是窗体全屏显示!!!
请各位帮忙分析一下!!
ScreenWidth: LongInt = 800;
ScreenHeight: LongInt = 600;var
FWidth:integer;
begin
//适应分辨率的变化
if (screen.width <> ScreenWidth) then
begin
FWidth:=Width;
scaled := true;
Font.Size:=(screen.Width DIV screenWidth)*Font.Size;
scaleBy(screen.width, ScreenWidth);
height := longint(height) * longint(screen.height) div ScreenHeight;
width := longint(width) * longint(screen.width) div ScreenWidth; end;
问题:当窗体的borderstyle属性 为bsSizeable是可以实现按比例放大,当窗体的borderstyle属性其余的属性时,运行的结果是窗体全屏显示!!!
请各位帮忙分析一下!!
解决方案 »
- 怎样获取程序运行时的控件尺寸和位置?
- 与日期相关的数据库检索
- 加权平均分
- 哪儿有dbexpress补丁下载?
- 百分求助,在线等待……
- 如何判断datatime型字段是否在一个时间段范围之内
- 当form1调用form2时,如何能保证焦点只在form2中(除非form2关闭),即form2只能在最前
- 在用导航控件对表中的同一条记录进行连续第二次修改时为什么会出错呢????!!!
- 可执行程序或者DLL中的资源怎样提取呢?
- 用bde..PackDbf问题
- 窗口控制问题:按下一个TForm对象的'最小','最大','X(关闭)',分别对应那个响应函数,如何使这些操作不产生效果?
- 请问哪里有关于数据库多线程查询的文章?谢谢
ScreenHeight,ScreenWidth:Longint;
begin
scaled := true;
ScreenHeight:=600;
ScreenWidth:=800;
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;
var OldBorderStyle : TBorderStyle;
OldBorderStyle:=Form1.BorderStyle;
Form1.BorderStyle:=bsSizeable;
...
Form1.BorderStyle:=OldBorderStyle;
800*600调到1024*768可以。调到1280*1024时,就全屏了!明天我试试楼上的方法!多谢各位!!