Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Canceling Printing in MS Common Dialog
Message
De
28/11/1999 16:57:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Canceling Printing in MS Common Dialog
Divers
Thread ID:
00296206
Message ID:
00296206
Vues:
55
Hi Everyone,

I am using Microsoft´s Common Dialog activeX control to select printer settings before issueing a report. It seems to be that the CancelError property if set to .T., generates Error # 32755 if user selects Cancel command button, while in the printer properties dialog. In order to trap the error I wrote the following code:
	On Error Do ErrHand
	thisform.oleMSCommonDialog.CancelError=.T.
	thisform.oleMSCommonDialog.ShowPrinter
	On Error
	thisform.oleCrystal.Destination=0
	thisform.oleCrystal.ReportFilename=cPath+'visitas.rpt'
	thisform.oleCrystal.PrintReport
	
For debugging purposes ErrHand is a PRG with the following code:

	Procedure ErrHand
		wait window "Error 32755 has occured"
	Return
ErrHand routine is not being called, even if exiting Printer dialog with cancel button, that is, error message above is not displayed.

How can I trap the error or cancel printing if user presses the cancel button ?
Thanks in Advanced or Hope This Helps
Répondre
Fil
Voir

Click here to load this message in the networking platform