User (Legacy) Posted March 8, 2005 Report Share Posted March 8, 2005 In a VB exe I am trying to capture the results of the Print Dialog using the Common dialog for printers. I have two reports printing, one from Crystal and the other the Chart from ChartFx. What I want to do is to wait for the user to press either the Print button or the Cancel button from the common dialog window for printers and then either print both the report and graph or do nothing. What I do not understand yet, is that when the user presses the Printer icon from the toolbar, I get two dialog windows popping up, one after the other. What I have done is put code in the Internalcommand method of Chartfx1 like this: frmReport.ChartFX1.Printer.hDC = frmReport.CommonDialog1.hDC frmReport.CommonDialog1.ShowPrinter If wParam = 29442 Or wParam = 29443 Then On Error GoTo cancel frmReport.CommonDialog1.CancelError = True If lShowCriteriaPage Then lcrCriteriaReport.PrintOut False End If End If cancel: On Error GoTo 0 Exit Sub I guess the question is how do I shut down the Print Dialog window that Chartfx is producing and also control the response from the user, Print or Cancel? Thanks, Joe Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.