Autor Beitrag
Rag3
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Mo 04.04.05 21:58 
Hi,
hab mal wieder ein Prob: Wie kann ich feststellen, ob ein Drucker überhaupt installiert ist bevor ich einen Druckdialog öffne?

mfg
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Mo 04.04.05 22:01 
Printer.Printers.Count

Printer ist ein globales Objekt aus der Unit Printers. Weitere Informationen findest du in der Hilfedatei.

_________________
Ciao, Sprint.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mo 04.04.05 22:04 
Hallo!

Hier mal zwei nützliche Funktionen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
uses
  Printers;

function PrinterInstalled: Boolean;
begin
  Result := (Printer <> nil) and (Printer.Printers.Count > 0);
end;

function NumberOfPrintersInstalled: Integer;
begin
  if PrinterInstalled then
    Result := Printer.Printers.Count
  else
    Result := 0;
end;
Rag3 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Di 05.04.05 00:14 
danke hat gefunzt!