Thema: Delphi Druckproblem

Einzelnen Beitrag anzeigen

Sämy

Registriert seit: 4. Nov 2004
Ort: Basel (CH)
76 Beiträge
 
Delphi 2007 Professional
 
#4

Re: Druckproblem

  Alt 19. Apr 2008, 18:27
Hab es selbst rausgefunden.
Da ich von der Klasse TPrinter ableitete, musste ich beim ändern der Eigenschaft PrinterIndex noch SetPrinter aufrufen:

Delphi-Quellcode:
procedure TSZPrinter.setPrinterIndex(value: integer);
begin
  inherited PrinterIndex := value;

  { Reinit the hDMode }
  GetPrinter(aDevice, aDriver, aPort, hDMode);
  hDMode := 0;
  SetPrinter(aDevice, aDriver, aPort, hDMode);
end;
Danke trotzdem!
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
  Mit Zitat antworten Zitat