Error in FWH 18.01

Error in FWH 18.01

Postby ORibeiro » Thu Mar 01, 2018 6:37 pm

I changed line 438 of Printer.prg because PrinterSetup () and GetPrintDC () were not modifying the system printer.

Code: Select all  Expand view


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
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Re: Error in FWH 18.01

Postby Antonio Linares » Sat Mar 03, 2018 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error in FWH 18.01

Postby ORibeiro » 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
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Re: Error in FWH 18.01

Postby Antonio Linares » Sun Mar 04, 2018 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error in FWH 18.01

Postby ORibeiro » Sun Mar 04, 2018 5: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
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests

cron