A belated 'thanks' to those who replied: Bill Thoen (who else) suggested a couple of links:
Tip 78: Retrieving the Names of All Printers - http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvbtips/ html/msdn_msdn78.asp & http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspo l_9fjn.asp . Using these examples (especially the first) I've been able to get it work in VB but not in MapBasic. In MapBasic I just get the first printer name returned in my string but not the other two that should appear! Aaargh! Steve Smith suggested I use the MapInfo print menu by running the following command within my MapBasic prog run menu command 112. That was one solution I hadn't really thought about and may well be the way I go. Thanks also to Ian Hull, who's trying to do something similar and if I ever get mind to work Ian, I'll share the code! Thanks all. Greg > -----Original Message----- > From: Driver, Greg 9434 > Sent: Tuesday, February 03, 2004 17:23 > To: MapInfo-L (E-mail) > Subject: MI-L Printer information > > Listers, > > I'm in the process of writing a simple layout generator and I'd like to be > able to allow the user to select a printer from those that are available > and > then set that this as the one to use (just like the Printer... option in > Page Setup dialog). Can anyone point me in the right direction (I guess > it's an API call), or even provide some sample code (cheeky, I know:)! > > Thanks > > Greg. > > Mapping & Data Officer > Surrey Police > > > > Internet communications are not secure and therefore Surrey Police does > not > accept legal responsibility for the contents of this message. This email > and any attachments may be confidential. They may contain privileged > information and are intended for the named addressee (s) only. They must > not > be distributed without our consent. If you are not the intended recipient, > please notify us immediately and delete the message and any attachments > from > your computer, do not disclose, distribute, or retain this email or any > part > of it. Unless expressly stated, opinions in this email are those of the > individual sender, and not of Surrey Police. We believe but do not warrant > that this e-mail and any attachments are virus free. You must therefore > take > full responsibility for virus checking. Surrey Police reserves the right > to > monitor all email communications through their networks. > > > > Internet communications are not secure and therefore Surrey Police does not accept legal responsibility for the contents of this message. This email and any attachments may be confidential. They may contain privileged information and are intended for the named addressee (s) only. They must not be distributed without our consent. If you are not the intended recipient, please notify us immediately and delete the message and any attachments from your computer, do not disclose, distribute, or retain this email or any part of it. Unless expressly stated, opinions in this email are those of the individual sender, and not of Surrey Police. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking. Surrey Police reserves the right to monitor all email communications through their networks.
