FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour tPrinter "problem" with last FWH release
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
tPrinter "problem" with last FWH release
Posted: Thu Sep 24, 2015 01: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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: tPrinter "problem" with last FWH release
Posted: Thu Sep 24, 2015 02:56 PM

Look to see if it helps

viewtopic.php?f=6t=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
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: tPrinter "problem" with last FWH release
Posted: 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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: tPrinter "problem" with last FWH release
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: tPrinter "problem" with last FWH release
Posted: Fri Sep 25, 2015 02: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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion