tPrinter "problem" with last FWH release

tPrinter "problem" with last FWH release

Postby Marco Turco » Thu Sep 24, 2015 1:04 pm

Hi all,
I'm using FWH 15.07 updated from FWH december 2012.

I noted there is an important change into the tPrinter method,
essentially this new FWH always use as default the Windows default printer while the old FWH always use the current app printer (eg. the printer I selected with PrinterSetup()).
This is reported into the whatsnews.txt as enhancement. In my opinion this is a wrong change: the tPrinter should use the current printer selected in the app (if different from the Windows default printe). Anyway do you know how can solve the problem ?

Thank you in advance.

* Enhancement: Class TPrinter Method New() has been improved so the selected
printer (default printer) remains the same all the app life. Thanks to Enrico!
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: tPrinter "problem" with last FWH release

Postby cnavarro » Thu Sep 24, 2015 2:56 pm

Look to see if it helps

viewtopic.php?f=6&t=31362#p181915

Regards
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: tPrinter "problem" with last FWH release

Postby Marco Turco » Fri Sep 25, 2015 10:22 am

Hi,
I checked the turnaround but it is not correct in my opinion.
That turnaround essentially change the Windows default printer with the printer selected with PrinterSetup() but this is wrong, due the PrinterSetup() should only change the default printer for THAT Windows app until it is running non for the full OS. The right solution was that with FWH december 2012.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: tPrinter "problem" with last FWH release

Postby Enrico Maria Giordano » Fri Sep 25, 2015 10:42 am

Marco Turco wrote:* Enhancement: Class TPrinter Method New() has been improved so the selected
printer (default printer) remains the same all the app life. Thanks to Enrico!


This should work exactly as you want. Apps use their selected printers and not the Windows default one. At least that's how it works in my applications.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: tPrinter "problem" with last FWH release

Postby James Bott » Fri Sep 25, 2015 2:59 pm

* Enhancement: Class TPrinter Method New() has been improved so the selected
printer (default printer) remains the same all the app life. Thanks to Enrico!


The above statement is confusing.

The selected printer may, or may not, be the windows default printer. FW used to always use the default printer when it started but you could change that via either code or the printer selection dialog to a new printer which would become the "current" printer for that app, until or unless a different printer was selected (again, either via code, or user selection).

It is unclear in the above statement if "(default printer)" is referring to the Windows default printer or the app default printer (normally called the "current" printer in my experience).

Not having the ability to default to a different printer in an app would mean the programmer will have to override every print function via code to use different printer by default. If some programmers think defaulting to the Windows default printer always is helpful, then perhaps it would be useful for them to have a system-wide flag that would provide that behavior, but that defaults to the legacy behavior.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests