Page 1 of 1

PrintPreviewPanel does not accept PrintDialog Settings.

Posted: Mon Sep 27, 2004 10:47 pm
by 9523566
Atten. Josep Lluis Jorge
Thank you for your effort to understand my question.
Simply my help is that.

In VB.NET with TChartAX(V6),the printpreviewpanel does not
accept a printdialog setting.
I wish to print multi chart in a paper by following procedure.
AxPreviewPanel show-->PrintDialog-->AxPreviewPanel.Print
In case using AxPrintPreviewer,it can do this but single chart a peper.

Same procedure works well in TChartVCL.

Thank you again in advance. Best Regards,

Posted: Tue Sep 28, 2004 6:57 am
by Chris
Hi --
In VB.NET with TChartAX(V6),the printpreviewpanel does not
accept a printdialog setting.
I wish to print multi chart in a paper by following procedure.
AxPreviewPanel show-->PrintDialog-->AxPreviewPanel.Print
In case using AxPrintPreviewer,it can do this but single chart a peper.
Try:

Code: Select all

  '------------------------------------------ 
    'Start Pring after execute printdialog 
    '------------------------------------------ 
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim result As DialogResult

        PrintDialog1.PrinterSettings = New Printing.PrinterSettings
        result = PrintDialog1.ShowDialog()

        If result = DialogResult.OK Then
            For i As Integer = 0 To AxTChart1.Printer.PrinterCount - 1
                If AxTChart1.Printer.PrinterDescription(i) = PrintDialog1.PrinterSettings.PrinterName Then
                    AxTChart1.Printer.PrinterIndex = i
                    AxTChart2.Printer.PrinterIndex = i
                    AxTeePreviewPanel1.PrintPage()
                End If
            Next
        End If
    End Sub