我正在尝试打印程序中组合框的所有内容,编号。
ComboBox1 内容:
Yes
No
Maybe
No Opinion
到目前为止,我的 PrintDocument1 代码:
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim horizontalPrintPosition As Single
Dim verticalPrintPosition As Single
Dim PrintFont As New Font("Arial", 12)
e.Graphics.DrawString("Info from ComboBox1 would go here", PrintFont, Brushes.Black, horizontalPrintPosition, verticalPrintPosition)
End Sub
例如,所需的输出将是:
1. Yes
2. No
3. Maybe
4. No Opinion
谢谢!