FWH 13:09 Default Printer
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH 13:08 Default Printer
_,
I also need this, please:
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
I also need this, please:
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH 13:08 Default Printer
_,
This way:
This way:
Code: Select all
elseif cModel == nil
cModel = ::GetModel() + "," + ::GetDriver() + "," + ::GetPort()
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
::hDC := PRINTERDCFROMNAME( STRTOKEN( GETPROFSTRING( "Devices", cModel, "" ), 1, "," ), cModel, STRTOKEN( GETPROFSTRING( "Devices", cModel, "" ), 2, "," ) )
Re: FWH 13:08 Default Printer
With:
cModel = ::GetModel() + "," + ::GetDriver() + "," + ::GetPort()
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
The result is blank. Returns nothing.
cModel = ::GetModel() + "," + ::GetDriver() + "," + ::GetPort()
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
The result is blank. Returns nothing.
_ Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH 13:08 Default Printer
_,
This is the current code for that else:
That should work for you, though you say that the selected printer does not remain selected all the app execution ?
This is the current code for that else:
Code: Select all
::hDC := GetPrintDefault( GetActiveWindow() )
if ::hDC != 0
cModel = ::GetModel() + "," + ::GetDriver() + "," + ::GetPort()
endif
Re: FWH 13:08 Default Printer
Linares,
I'll try my users adapt to this new reality.
But the ideal is that the system working again as before, as Windows programs work. For example, the MS-Word. When you open a document and before printing, change the printer destination, every impression of MS-Word will come out this new printer, even if you open other documents, printing will be directed to this same printer as MS-Word is open. Without affecting in any way the standard printer control panel of Windows. That's how programs Fivewin for Windows should work.
Please do this test in MS-Word.
Thanks,
I'll try my users adapt to this new reality.
But the ideal is that the system working again as before, as Windows programs work. For example, the MS-Word. When you open a document and before printing, change the printer destination, every impression of MS-Word will come out this new printer, even if you open other documents, printing will be directed to this same printer as MS-Word is open. Without affecting in any way the standard printer control panel of Windows. That's how programs Fivewin for Windows should work.
Please do this test in MS-Word.
Thanks,
_ Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH 13:08 Default Printer
_,
Where are you selecting the target printer ? From the preview itself ?
Where are you selecting the target printer ? From the preview itself ?
Re: FWH 13:08 Default Printer
Linares,
We select one of two ways:
In the menu system using the command:
GetPrintDC (GetActiveWindow ())
Or before printing with the command:
PRINTERSETUP ()
Thanks,
We select one of two ways:
In the menu system using the command:
GetPrintDC (GetActiveWindow ())
Or before printing with the command:
PRINTERSETUP ()
Thanks,
_ Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH 13:08 Default Printer
Here there is some code that may help for what you are looking for:
https://www.powerbasic.com/support/pbfo ... hp?t=15204
We need to migrate it to FWH
https://www.powerbasic.com/support/pbfo ... hp?t=15204
We need to migrate it to FWH
Re: FWH 13:08 Default Printer
Yes. This is the way.
_ Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
Re: FWH 13:08 Default Printer
I do not know if this can help
http://forums.fivetechsupport.com/viewt ... =3&t=27371
Maurizio
www.nipeservice.com
http://forums.fivetechsupport.com/viewt ... =3&t=27371
Maurizio
www.nipeservice.com
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH 13:08 Default Printer
Maurizio,
Thanks for your help. What _ is looking for is to set a default printer from our apps that remains selected all the app execution time and does not modify the WIndows default printer.
Thanks for your help. What _ is looking for is to set a default printer from our apps that remains selected all the app execution time and does not modify the WIndows default printer.
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: FWH 13:08 Default Printer
_,
why don´t you use the TO <cPrinter> clause ?
1: get all printers with GetPrinters() (function from xHarbour) or any other function.
2: select the desired printer and save it in a global var or in an ini-file.
3: use always the TO clause (PRINT...TO, REPORT...TO, etc)
That does not affect the windows default printer and is working fine. I always use this technic and I never had problems
why don´t you use the TO <cPrinter> clause ?
Code: Select all
PRINT oPrn TO <cPrinterName>
2: select the desired printer and save it in a global var or in an ini-file.
3: use always the TO clause (PRINT...TO, REPORT...TO, etc)
That does not affect the windows default printer and is working fine. I always use this technic and I never had problems
kind regards
Stefan
Stefan
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH 13:08 Default Printer
Stefan,
Very good, many thanks
Many times we miss the simplest way to do things
Very good, many thanks
Many times we miss the simplest way to do things
Re: FWH 13:08 Default Printer
Linares,
I'm with version FWH 13:09 Revision 2 and the selected printer is not getting active throughout the program. Should I make any changes in the source?
Thanks,
I'm with version FWH 13:09 Revision 2 and the selected printer is not getting active throughout the program. Should I make any changes in the source?
Thanks,
Code: Select all
* Enhancement: Class TPrinter Method New() has been improved so the selected printer (default printer) remains the same all the app life. Thanks to Enrico!
viewtopic.php?p=152663#p152663
_ Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72