我在D5+SQL 2000 SERVE环境下开发的程序,拿到WIN98下就变形了,窗口变大了。怎么才能保持不变呢。

解决方案 »

  1.   

    根据新的分辨率自动重画表单及控件  先在表单单元的Interface部分定义两个常量,表示设计时的屏幕的宽度和高度(以像素为 单位)。在表单的Create事件中先判断当前分辨率是否与设计分辨率相同,如果不同,调用表 单的SCALE过程重新能调整表单中控件的宽度和高度。Const
    Orignwidth=800;
    Orignheight=600;procedureTForm1.FormCreate(Sender:TObject);
    begin
    scaled:=true;
    if(screen.width<>orignwidth)then
    begin
    height:=longint(height)*longint
    (screen.height)divorignheight;
    width:=longint(width)*longint
    (screen.width)divorignwidth;
    scaleby(screen.width,orignwidth);
    end;
    end;
     
      

  2.   

    把form的font设为宋体和GB2312字符集。