1. Dawn Browneyes
  2. PowerBuilder
  3. Tuesday, 23 August 2022 21: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)



There are no replies made for this question yet.
However, you are not allowed to reply to this question.