Dim dyj As WinForm.ComboBox = e.Form.Controls("ComboBox1")
For Each p As String In InstalledPrinters
dyj.Items.Add(p)
Next
打印代码如下
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
Dim rt = New prt.RenderText '设置文本对象的内容
rt.Text = "第[PageNo]页,共[PageCount]页" '设置文本内容
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Right '靠右对齐
rt.Style.Padding.Top = 15
rt.Style.Padding.right = 25
rt.Style.FontSize = 8 '字体大小为8磅
Doc.PageHeader = rt '作为页眉使用
Dim pr As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Doc.PrinterName ="pr.Value"
doc.Print()
为什么选了下拉列表的打印机,打印出来还是默认的呢,哪里错了