【问题标题】:How to print a form in vb.net 2010?如何在 vb.net 2010 中打印表格?
【发布时间】:2013-04-16 08:32:45
【问题描述】:

我想打印一个带有可滚动 datagridview 表的表单。但是我在 *.docx 中得到了一个空文件。

【问题讨论】:

  • 你能发布你的代码和错误日志(如果有的话)吗?

标签: vb.net forms printing


【解决方案1】:

来自MSDN - PrintForm Component (Visual Basic)

' For Direct Printing to a Printer
Dim pf As New PrintForm
pf.Form = Me
pf.PrintAction = PrintToPrinter
pf.Print()

有关“打印到文件”选项,请参阅 MSDN - Print a Form by Using the PrintForm Component

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-22
    • 2013-09-19
    • 2011-11-06
    • 1970-01-01
    • 2017-04-22
    • 1970-01-01
    相关资源
    最近更新 更多