Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sys(1037)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00620415
Message ID:
00620856
Views:
21
Thanks to Garrett, I have been able to refine my code even further (took the Error method of the picture):
thisform.oleCommonDialog.CancelError = .T.
lcErrorH = ON("ERROR")
ON ERROR *
rv = thisform.oleCommonDialog.ShowPrinter()
ON ERROR &lcErrorH
rv = AERROR(laError)
if laError(1, 1) = 1429 and laError(1, 6) = 32755
	return
endif
Some may disagree, but this seems more straight forward than trapping for the error in the Error method. Besides, this way, I can put this code into a custom method or procedure file.

Thank you once again!
Steve

>It would be slightly more elegant to check AERROR(laError) and confirm that laError(1, 6) (or laError(1, 7), depending on the version of VFP) is cdlCancel (32755).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform