.net PageSetupDialog不能返回正确的纸张设置,总是返回custom(0)的问题!!!
拼命三朗 2008-02-11 03:00:14 Dim PrinterSettings As New Drawing.Printing.PrinterSettings
Dim PageSettings As New Drawing.Printing.PageSettings(PrinterSettings)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dlgPrnSet As New Windows.Forms.PageSetupDialog
dlgPrnSet.EnableMetric = True
dlgPrnSet.PrinterSettings = PrinterSettings
dlgPrnSet.PageSettings = PageSettings
dlgPrnSet.ShowDialog()
dlgPrnSet.Dispose()
dlgPrnSet = Nothing
End Sub
上述代码应该是调用PageSetupDialog的正确方法,可为何总是返回custom,是vs.net的bug吗?难不成要自己写一个PageSetupDialog???
有趣的是只要一选择自定义的纸张,就总是返回custom,再回头选择“A4”等常规纸张也是返回custom。