General information
Category:
ActiveX controls in VFP
I almost have this working properly, but now I have a timing issue. What I am attempting to do is temporarily change the Windows Default Printer (if necessary), print an html document using ExecWB, and then change the Default Printer back. All of this is working just fine about 50% of the time, but sometimes the Windows Default Printer is getting changed back too quickly. I guess I am looking for a way to make sure that execWB is finished (ie, check the print spooler to see if my document has finished printing.)
Here is my code that is being fired from a Form's command button:
IF gcPrinterName <> gcDefaultPrinter
*!* Printer in evip.ini is not the same as the Default Printer
oNet.SetDefaultPrinter(gcPrinterName)
ENDIF
thisform._wEBBROWSER41.execWB(6, 1)
IF UPPER(ALLTRIM(SET("PRINTER", 2))) <> gcDefaultPrinter
*!* Change the Windows Default Printer back
oNet.SetDefaultPrinter(gcDefaultPrinter)
ENDIF
thisform.Release()
Thanks again Yuri and Sergey for helping me this far ;)
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only