🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3178

Re: setdefaultprinter

#3178
From: Clayton Arends
Date: Sun, 03 Sep 2006 18:49
16 lines
1694 bytes
The first time the global VCL Printer object is referenced it will point to 
the system default printer.  If you change the system default printer then 
the printer object must be changed manually.  If you have control over the 
application then you can do something like the following:

  TPrinter* printer = Printer();
  int printerIndex = printer->Printers->IndexOf(theNewName);
  printer->PrinterIndex = printerIndex;

The exact way to get the new printerIndex might vary depending on the actual 
name you have.  But in any case you need to get the index some how.

As Bob mentioned, borland.public.cppbuilder.vcl.components.using would have 
been a better newsgroup to post this question.

- Clayton 
Technical Details
Message-ID: <44fb239f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44f739be$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d62b258d0db94032
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Clayton Arends" <nospam_claytonarends@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44f739be$1@newsgroups.borland.com>
Subject: Re: setdefaultprinter
Date: Sun, 3 Sep 2006 11:49:00 -0700
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 71.83.251.192
Message-ID: <44fb239f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1157309343 71.83.251.192 (3 Sep 2006 11:49:03 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail