Top := 50;
  Left := Screen.width - width - 27;
  ScrollBox1.Align := alClient;
  verwbmp := Tbitmap.Create;
  verwbmp.Width:= 950;
  verwbmp.Height:= 1400;
  verwbmp.PixelFormat:= pf8bit;
  verwbmpexists := True;谢谢

解决方案 »

  1.   


    Printer.Orientation := poPortrait;
    fblv := getdevicecaps(printer.handle, LOGPIXELSX);
    fblh := getdevicecaps(printer.handle, LOGPIXELSy);
    pageh := TRUNC((printer.PageHeight / fblh) * 25.4);
    pagew := TRUNC((printer.PageWidth / fblv) * 25.4); 再加一段,一段~!
      

  2.   

    I get the printer resolution (and unprintable are if desired) and
    then specify coordinates using decimal inches * resulution e.g.
    x = trunc(1.5 * ResX) at 300 dpi will begin at 360 * 1.5 or 540 pixels.
    Get Resolution and unprintable
        ResX := GetDeviceCaps(ACanvas.Handle,LOGPIXELSX);
        ResY := GetDeviceCaps(ACanvas.Handle,LOGPIXELSY);
        pOffsetX := GetDeviceCaps(ACanvas.Handle,PHYSICALOFFSETX);
        pOffsetY := GetDeviceCaps(ACanvas.Handle,PHYSICALOFFSETY);

    print something
        Printer.Canvas.TextOut(trunc(1.5 * ResX)-pOffsetX,
                  trunc(2.5 * ResY)-pOffsetY,'Hello');
    This is nice when printing data on an existing paper form as you can
    just measure it up in decimal inches.
      

  3.   

     Top := 50;
      Left := Screen.width - width - 27;
      ScrollBox1.Align := alClient;//设置控件的位置
      verwbmp := Tbitmap.Create;
      verwbmp.Width:= 950;
      verwbmp.Height:= 1400;
      verwbmp.PixelFormat:= pf8bit;
      verwbmpexists := True; //创建个bmp图片
      

  4.   

    没有安装MSDN~!哈哈。英文版的帮助~?
      

  5.   

     verwbmp.Width:= 950;
     verwbmp.Height:= 1400;
    数字后面的单位是什么?像素?
    还是其它的?
      

  6.   

    估计楼主掉下了with xxxxx do
    begin
      ............
      ............
      ............
    end;
      

  7.   

    自己参考别人的程序写的打印模块,现在困扰我的是只能输出打印机默认的纸张大小,例如HP5100的默认纸张是A4,如何能够不改变打印机的默认设置,打出B5大小的纸张呢?有经验的高手给指点指点。
      

  8.   

    b5纸张的大小是长度257mm-宽度182mm,是不是把这个定死就ok了?