Oscar,
I also need this, please:
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
Oscar,
I also need this, please:
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
elseif cModel == nil
cModel = ::GetModel() + "," + ::GetDriver() + "," + ::GetPort()
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
::hDC := PRINTERDCFROMNAME( STRTOKEN( GETPROFSTRING( "Devices", cModel, "" ), 1, "," ), cModel, STRTOKEN( GETPROFSTRING( "Devices", cModel, "" ), 2, "," ) )With:
cModel = ::GetModel() + "," + ::GetDriver() + "," + ::GetPort()
MsgInfo( GETPROFSTRING( "Devices", cModel, "" ) )
The result is blank. Returns nothing.
::hDC := GetPrintDefault( GetActiveWindow() )
if ::hDC != 0
cModel = ::GetModel() + "," + ::GetDriver() + "," + ::GetPort()
endifLinares,
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,
Oscar,
Where are you selecting the target printer ? From the preview itself ?
Linares,
We select one of two ways:
In the menu system using the command:
GetPrintDC (GetActiveWindow ())
Or before printing with the command:
PRINTERSETUP ()
Thanks,
Yes. This is the way.
Maurizio,
Thanks for your help. What Oscar 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.
PRINT oPrn TO <cPrinterName>Stefan,
Very good, many thanks
Many times we miss the simplest way to do things ![]()
* 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