【问题标题】:Printing all Labels in a Form VB.net打印表单 VB.net 中的所有标签
【发布时间】:2015-09-08 21:02:25
【问题描述】:

我想打印一个表单中的所有标签
怎么做?

我的表单中有更多的 12 个标签

【问题讨论】:

  • 您能详细解释一下您的问题吗?就目前而言,很难看出你在问什么。
  • 欢迎来到 Stack Overflow!请花点时间仔细阅读How to Ask

标签: vb.net printing label


【解决方案1】:

有关 vb.net 打印方法的详细信息,请参阅此页面:

https://social.msdn.microsoft.com/Forums/en-US/72b5a038-912d-4455-929d-89eeb9984d7c/how-do-i-print-a-form-in-vbnet?forum=Vsexpressvb

要从所有标签中取出文本,请使用以下代码:

For Each ctrl As Control In Me.Controls
    If TypeOf (ctrl) Is Label Then
        Dim newLine As String = ctrl.Name & ": " & ctrl.Text
        'Process newLine as you see fit
    End If
Next

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-07
    • 1970-01-01
    • 1970-01-01
    • 2017-04-22
    相关资源
    最近更新 更多