G
Guest
I use the PageSetupDialog box to allow the user to change the page margins
before printing. The problem is when I open the dialog box and type in margin
values in millimeters (as it says in the group border title), click on the OK
button, and then open the dialog box again, I find that all the margin values
were divided by 2.54.
Basically, every time I open that Dialog box and click on OK, all the margin
values get divided by 2.54.
I know that this is a metric-imperial unit problem, but I don't know how to
fix it. I have used the following code to open the dialog box:
Dim pd As PrintDocument = C1grd.PrintParameters.PrintDocument()
PageSetupDialog.Document = pd
If PageSetupDialog.ShowDialog = DialogResult.OK Then
MsgBox (PageSetupDialog.PageSettings.Margins)
End If
Any help is appreciated
before printing. The problem is when I open the dialog box and type in margin
values in millimeters (as it says in the group border title), click on the OK
button, and then open the dialog box again, I find that all the margin values
were divided by 2.54.
Basically, every time I open that Dialog box and click on OK, all the margin
values get divided by 2.54.
I know that this is a metric-imperial unit problem, but I don't know how to
fix it. I have used the following code to open the dialog box:
Dim pd As PrintDocument = C1grd.PrintParameters.PrintDocument()
PageSetupDialog.Document = pd
If PageSetupDialog.ShowDialog = DialogResult.OK Then
MsgBox (PageSetupDialog.PageSettings.Margins)
End If
Any help is appreciated