احسان آریانو
جمعه 16 بهمن 1383, 10:14 صبح
سلام
با چه دستوری میشه تشخیص داد
که مثلا خاموش یا وصل نیست و ... ممنون
احسان آریانو
دوشنبه 19 بهمن 1383, 09:52 صبح
خدایی یکی کمک کنه بابا من چون تا حالا پرینت نگرفتم نمیدونم یعنی کسی تا حالا اینجا
این کارار نکرده
hr110
دوشنبه 19 بهمن 1383, 17:14 عصر
procedure TForm1.Button1Click(Sender: TObject);
var
Dev, Drv, Prt: Array[0..255] of Char;
DM1: PDeviceMode;
DM2: PDeviceMode;
Sz : Integer;
DevM: THandle;
begin
Printer.PrinterIndex := -1;
Printer.GetPrinter(Dev, Drv, Prt, DevM);
DM1 := nil;
DM2 := nil;
Sz := DocumentProperties(0, 0, Dev, DM1^, DM2^, 0);
GetMem(DM1, Sz);
DocumentProperties(0, 0, Dev, DM1^, DM2^, DM_OUT_BUFFER);
if DM1^.dmColor > 1 then
Label1.Caption := Dev + ': Color'
else
Label1.Caption := Dev + ': Black and White';
if DM1^.dmFields and DM_Color <> 0 then
Label2.Caption := 'Printer supports color printing'
else
Label2.Caption := 'Printer does not support color printing';
FreeMem(DM1);
end;
hr110
دوشنبه 19 بهمن 1383, 17:15 عصر
اینهم یادت نره : :)
Uses
Printers,
WinSpool;
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.