.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。
...全文
130 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
CopyrightSQL 2009-06-06
  • 打赏
  • 举报
回复
我也遇到这个问题,正在查询,有哪位高人知道如何处理?
拼命三朗 2008-07-21
  • 打赏
  • 举报
回复
顶者有分!
拼命三朗 2008-02-16
  • 打赏
  • 举报
回复
这肯定是.NET的超级bug,自己顶一下!

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧