Thank you for your prompt reply and help me again
to check my source code attached.
This is working well using default printer only.
Printer does not change as print dialog setting.
'--------------------------------
' Put Chart and Set Print Margine
'--------------------------------
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Fmain.MenuItem5.Checked Then
'---------------------
' Analog Page
'---------------------
With Fmain
With .AxTChart1.Printer
.PrintProportional = False
.MarginLeft = 5
.MarginTop = 5
.MarginRight = 5
.MarginBottom = 5
End With
AxTeePreviewPanel1.Orientation = TeeChart.ETeePreviewPanelOrientation.ppoLandscape
RadioButton1.Checked = True
AxTeePreviewPanel1.AddChartLink(.AxTChart1.ChartLink)
End With
ElseIf Fmain.MenuItem6.Checked Then
'---------------------
' Digital Page
'---------------------
With Fmain
With .AxTChart2.Printer
.PrintProportional = False
.MarginLeft = 5
.MarginTop = 5
.MarginRight = 5
.MarginBottom = 5
End With
AxTeePreviewPanel1.Orientation = TeeChart.ETeePreviewPanelOrientation.ppoLandscape
RadioButton1.Checked = True
AxTeePreviewPanel1.AddChartLink(.AxTChart2.ChartLink)
End With
ElseIf Fmain.MenuItem7.Checked Then
'---------------------
' Both Page
'---------------------
With Fmain
With .AxTChart1.Printer
.PrintProportional = False
.MarginLeft = 5
.MarginTop = 5
.MarginRight = 5
.MarginBottom = 50
End With
With .AxTChart2.Printer
.PrintProportional = False
.PrintProportional = False
.MarginLeft = 5
.MarginTop = 50
.MarginRight = 5
.MarginBottom = 5
End With
AxTeePreviewPanel1.Orientation = TeeChart.ETeePreviewPanelOrientation.ppoPortrait
RadioButton2.Checked = True
AxTeePreviewPanel1.AddChartLink(.AxTChart1.ChartLink)
AxTeePreviewPanel1.AddChartLink(.AxTChart2.ChartLink)
End With
End If
End Sub
'------------------------------------------
'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
AxTeePreviewPanel1.PrintPage()
End If
End Sub
'------------------
'Cancel Button
'------------------
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
I'm very sorry to attach long code.
Best Regards, Thank you very much in advance,
Again printer setting problem in VB.NET
Hi Takeda,
and it does not priint any page or just a empty page ?
and it does not priint any page or just a empty page ?
Pep Jorge
http://support.steema.com
http://support.steema.com