Autor Beitrag
Stefan-W
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: So 11.12.05 18:57 
Hi,

ich soll für mein Vater mal wieder was nützliches programmieren... nur hab ich davon absolut keine Ahnung.
Also beim Drucken kommt immer eine Fehlermeldung (das die Partone "leer" ist) die man erst weckdrücken muss, dass gedruckt wird. Nun soll ich die Fehlermeldung unterdrücken.
(ich hab mir gedacht, dass ich am ende gleich noch einbau, dass die Fehlermeldung 1x kommt und dann erst beim 2.x Drucken unterdrückt wird. So merkt man (fals man eine neue orginal Patrone nutzt, auch dass diese leer ist)
Kann mir einer von Euch bitte erklähren wie ich die Fehlermeldung unterdrücken kann?

Schon mal Danke im Vorraus

Tschau Stefan
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 11.12.05 23:59 
Dafür gibt es verschiedene Möglichkeiten.

Die einfachste besteht darin, in einem Timer periodisch über die Funktion "FindWindow" nach dem besagten Fenster zu suchen und dieses über "SendMessage" mit einer "WM_CLOSE"-Nachricht zu schließen. Beispiele dazu solltest Du hier im Forum genug finden.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Di 13.12.05 22:10 
danke für die Antwort. ich werds wohl auch so machen... (geht es aber vllt auch weng Ressis schonender? ich mein dass das Programm nur dann arbeitet wenn es das auch muss und nicht immer slle 2 Sek die Fenster sucht)
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 14.12.05 18:07 
API-Hook auf den Drucker-Treiber ;-) Wolltest Du das hören? Würd ich abraten, frisst wesentlich mehr Ressourcen ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Stefan-W Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 475

Win 7 SP1
D2005 PE
BeitragVerfasst: Mi 14.12.05 21:53 
;-) gut weis ich bescheid :D

Danke nochmal!