但是我试了一下,还是要分两页打印,请问能不能举个例子,我是如下写语句的: 通用模块: Public Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long
'从画笔的当前位置到(x,y)画一条线
Public Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
'在(x,y)处输出一个字符串
Public Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
'MoveToEx() 函数需要的参数
Public Type POINTAPI
xp As Long
yp As Long
End Type Dim papi As POINTAPI
Public Sub PrintBarCode(ByVal Pic As Object, ByVal PrintDC As Long, ByVal strBarCode As String, Optional ByVal intXPos As Integer = 0, Optional ByVal intYPos As Integer = 0, Optional ByVal intPrintHeight As Integer = 10, Optional ByVal bolPrintText As Boolean = True) ......(语句是参考http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=12211) end sub 打印窗体中的语句: Private Sub Command1_Click() PrintBarCode Printer, 10, Form2.Text1, , , , True '打印条形码发货单号 DataReport1.PrintReport '打印此发货单的其他内容 End Sub 请各位高手帮我出出主意,我已没有办法了!
http://www0.ccidnet.com/tech/guide/2000/05/12/58_695.html
通用模块:
Public Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long
'从画笔的当前位置到(x,y)画一条线
Public Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
'在(x,y)处输出一个字符串
Public Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
'MoveToEx() 函数需要的参数
Public Type POINTAPI
xp As Long
yp As Long
End Type
Dim papi As POINTAPI
Public Sub PrintBarCode(ByVal Pic As Object, ByVal PrintDC As Long, ByVal strBarCode As String, Optional ByVal intXPos As Integer = 0, Optional ByVal intYPos As Integer = 0, Optional ByVal intPrintHeight As Integer = 10, Optional ByVal bolPrintText As Boolean = True)
......(语句是参考http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=12211)
end sub
打印窗体中的语句:
Private Sub Command1_Click()
PrintBarCode Printer, 10, Form2.Text1, , , , True '打印条形码发货单号
DataReport1.PrintReport '打印此发货单的其他内容
End Sub
请各位高手帮我出出主意,我已没有办法了!