前两个星期我也遇到这个问题,不过用这段代码就搞定了,你试试!
const
ScreenWidth: LongInt = 800; {在分辨率为 800x600 的模式下编程.}
ScreenHeight: LongInt = 600;
if (screen.width <> ScreenWidth) then
begin
height := longint(height) * longint(screen.height) DIV ScreenHeight;
width := longint(width) * longint(screen.width) DIV ScreenWidth;
ChangeScale(screen.Height,ScreenHeight);
end;
在不同分辨率下效果是一样的。
参见:http://www.delphibbs.com/delphibbs/dispq.asp?lid=153680
http://www.delphibbs.com/delphibbs/dispq.asp?lid=563901
http://www.delphibbs.com/delphibbs/dispq.asp?lid=432962
http://www.delphibbs.com/delphibbs/dispq.asp?lid=269839
内似问题有N多