Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExecWB and specifying a printer
Message
De
18/10/2004 10:50:25
 
 
À
14/10/2004 17:41:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00951574
Message ID:
00952274
Vues:
9
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 ;)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform