>Hi All!
>
>May be anybody know how to detect(programm's way)Laser printer or Dot Matrix ?
>It is a must for append to file( for printing) corresponding type of printer to controlling codes ( exmpl.-Portrait or Landscape and etc.)
>
To amplify Robert's statement, the only clue would be to examine the driver for the chosen printer, match it up against a table of all known printers, and have each known printer identify itself as a given type. This is not a foolproof method - some printers like the Generic/Text Only printer are ubiquitous - anyone can use them, and no model-specific detail is exposed, or you cn intentionally use a different driver - some of the Panasonic lasers, notably the 4450i, could emulate the IBM ProPrinter and Epson FX-80.
If the devie is not a PnP device, run under a PnP OS, it doesn't even identify itself to the syustem - you tell the system what type of printer it is during installation. And then there are printers that fit neither designation.
You're going to have to get the user to cooperate here and tell your program what it's dealing with.
You've made a really horrid assumption IAC; not all dot-matrix printers use the same control codes, not do all lasers. better to rely on the printer being instlaled properly and use the Windows GDI to handle printer control.