- Dawn Browneyes
- PowerBuilder
- Tuesday, 23 August 2022 09:54 PM UTC
I have an OLE control with a picture.
I want to print the control with ole...PrintIMage
When I do it defaults to the current printer
NOT the printer I changed it to in PowerBuilder using: PrintSetPrinter.
How can I use the printer it was set to using: PrintSetPrinter ??
I am using PB 2021
I had to change the registry. OLE is using the default printer and you can't change it with an OLE command.
Initially I had to get the default printer in the open:
ll_result = RegistryGet("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows", &
"Device", RegString!, is_print)
then when they close the window, if then changed it with PrintSetPrinter I changed it back to the default:
ll_result = RegistrySet("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows", &
"Device", RegString!, is_print)
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.