FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error in FWH 18.01
Posts: 187
Joined: Mon Oct 20, 2008 06:33 PM
Error in FWH 18.01
Posted: Thu Mar 01, 2018 06:37 PM
I changed line 438 of Printer.prg because PrinterSetup () and GetPrintDC () were not modifying the system printer.

Code (fw): Select all Collapse
METHOD End() CLASS TPrinter

   if ::hDC != 0
      if ! ::lMeta
         if ::lStarted
            EndDoc(::hDC)
         endif
      else
         Aeval(::aMeta,{|val| ferase(val) })
         ::aMeta  := {}
         ::hDCOut := 0
      endif
      if ::nOrient != nil
         if ::nOrient == DMORIENT_PORTRAIT
            ::SetPortrait()
         else
            ::SetLandscape()
         endif
      endif
//    PrinterEnd() -> 01/03/2018 (OASYS) Tirei essa linha para que ele mantenha a impressora selecionada no GetPrintDC() sem precisar mudar a impressora Default do Windows.
      DeleteDC( ::hDC )
      ::hDC := 0
   endif

   if ::oFont != nil
      ::oFont:End()
   endif

   oPrinter := nil

return nil
Oscar Ribeiro

OASyS Informática

Fwh18.02 + xHarbour 1.2.3 + Bcc72
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error in FWH 18.01
Posted: Sat Mar 03, 2018 08:31 AM

Oscar,

> PrinterSetup () and GetPrintDC () were not modifying the system printer

Should they modify the system printer ?

why ?

We appreciate a more detailed explanation, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 187
Joined: Mon Oct 20, 2008 06:33 PM
Re: Error in FWH 18.01
Posted: Sat Mar 03, 2018 10:02 AM

Thanks Linares,

Sorry but when I wrote “system” I was saying “My application”.

Just in Windows Terminal Server, the FWH18.01 stopped to accept the printer selected by user using printersetup() or getprintdc(). It was necessary to change printer.prg for it to function as before.

Oscar Ribeiro

OASyS Informática

Fwh18.02 + xHarbour 1.2.3 + Bcc72
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error in FWH 18.01
Posted: Sun Mar 04, 2018 01:02 PM

Oscar,

What FWH version were you using before ?

what were you able to do before but not now ?

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 187
Joined: Mon Oct 20, 2008 06:33 PM
Re: Error in FWH 18.01
Posted: Sun Mar 04, 2018 05:01 PM

Hi Linhares,

I was using the FWH 13.12 version.

I noticed that the printer.prg in that version was with this line (PrinterEnd) disabled.

Thanks.

Oscar Ribeiro

OASyS Informática

Fwh18.02 + xHarbour 1.2.3 + Bcc72

Continue the discussion