簡體   English   中英

打印表單 VB.net 中的所有標簽

[英]Printing all Labels in a Form VB.net

我想以表格形式打印所有標簽
怎么做?

我的表單中有更多的 12 個標簽

有關 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM