请教:如何获取打印机的分辨率?
GetDeviceCaps(printerHandle?,LOGPIXELSX);中
第一个参数怎么定义?
GetDeviceCaps(printerHandle?,LOGPIXELSX);中
第一个参数怎么定义?
解决方案 »
- 问题: 关于Free, FreeAndNil, Nil的判断,构造函数中产生异常? 非常困惑人
- 如何捕获关闭form的事件
- 谁有金碟K3的数据结构?
- TSQLCONNECT 连结问题?
- 请问如何调用vb的Dll?????????????????????????????????????????????????????????????????
- adodataset 的 displayvalues问题
- 三角函数正弦和余弦函数
- 菜鸟问,老鸟指教
- 大家赶快来分享一下
- 在 TMediaPlayer 中播放AVI或者mpeg 文件怎样才能使她全屏播放?
- 很难的一个问题,如果不是高手请不要进来,C/S结构数据库关于可信连接的问题(无未结帖记录)
- delphi中用sql怎么建索引啊?
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,printers,
StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
var
ppix : Integer;
begin
ppix := GetDeviceCaps(Printer.Handle, logPixelsX);
showmessage('x-dpi:'+floattostr(ppix));
ppix := GetDeviceCaps(Printer.Handle, logPixelsY);
showmessage('y-dpi:' +floattostr(ppix));
end;end.