Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Mar : tprinterselectiondialog - event when user selects a different printer?
| Subject: | tprinterselectiondialog - event when user selects a different printer? |
| Posted by: | "Arthur Hoornweg" (antispam.hoornweg@casema.nl.net) |
| Date: | Tue, 22 Mar 2005 08:25:33 |
Hello all,
in one of my applications I need to keep track of the paper format
and printer settings that a user uses. This application prints
very long sheets of paper and should not interfere with office
applications that normally print on A4 size paper.
In order to accomplish this, I grab hold of the DEVMODE structure
of the printer driver and save and restore it when necessary.
Whenever a user selects a different printer, I need to reload the
DEVMODE of that particular printer so the user has the paper
settings he used before.
My problem is, it often happens that the user switches to a
different printer in a tPrinterSelectionDialog and straight
away goes to the paper settings *before* my application
knows that the printer has changed. The user then sees the
standard paper size and not the size that he selected before.
In short, what I really need is an event that fires whenever
the user selects a different printer in the combobox of
tPrinterSelectionDialog so I can restore the proper paper
size immediately.
Any clues?
--
Arthur Hoornweg
(In order to reply per e-mail, please just remove the ".net"
from my e-mail address. Leave the rest of the address intact
including the "antispam" part. I had to take this measure to
counteract unsollicited mail.)