各位老师,我想在面的代码中暂停40秒(消除打印机排队),不知道怎么编写暂停的代码,请各位老师指导!
Dim n As Integer = Tables("数据导入_Table1").Rows.Count
Dim i As Integer
For i = 1 To n
‘暂停40秒
Dim doc As New PrintDoc() '定义一个报表
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Dim img As prt.RenderImage
Bar.Symbology = Barpro.Symbology.QRCode
'设置纸张页面
doc.PageSetting.LeftMargin = 0 '设置上边距
doc.PageSetting.TopMargin = 3 '设置左边距
'doc.PageSetting.Landscape = True '横向打印
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
Dim tbl As Table = Tables("数据导入_Table1")
Dim cr = tbl.Current
Dim ra As new prt.RenderArea
Dim rt As prt.RenderText
ra.width=97
ra.Height=46
ra.SplitHorzBehavior = prt.SplitBehaviorEnum.Never '禁止水平分割
ra.SplitVertBehavior = prt.SplitBehaviorEnum.Never '禁止垂直分割
ra.Style.Spacing.Bottom = 3
ra.Style.Borders.All = New prt.Linedef(0.3, Color.black) '设置边框
Doc.Body.ChildRen.Add(ra) '将容器加入到报表中
rt=new prt.rendertext
rt.text="编 号:"
rt.Style.FontBold = True '字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
rt.x=24
rt.y=3
ra.children.add(rt)
rt=new prt.rendertext
rt.text= cr("编号")
rt.Style.FontBold = True '字体加粗
rt.Style.FontSize = 14 '字体大小为16磅
rt.x=40
rt.y=3
ra.children.add(rt)
'Doc.Preview() '预览报表
Doc.Print()
With Tables("数据导入_Table1")
.Position = .Position + 1
End With
Next
谢谢!