B
billru
Unregistered / Unconfirmed
GUEST, unregistred user!
哪位高手能帮我把下面划线部分的VB过程改成DELPHI过程。
这是一段控制ZEBRA标签打印机的过程,其中GETFONTHEX是DLL函数。
Private Sub Command1_Click()
Dim MAX_BUFFER As Integer, nCount As Integer
Dim cBuf As String * 21000
Dim I As Integer
nCount = GETFONTHEX("钙奶片", "宋体", "chnstr01", 0, 50, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
nCount = GETFONTHEX("金额(¥)", "宋体", "chnstr02", 0, 40, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
nCount = GETFONTHEX("三联商业公司", "宋体", "chnstr03", 0, 40, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
nCount = GETFONTHEX("银座超市", "宋体", "chnstr04", 0, 40, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
Printer.Print "^XA^LH10,10"
Printer.Print "^FO100,20^XGchnstr01,1,1^FS"
Printer.Print "^FO20,100^BEN,60,Y,N^FD123456789012^FS"
Printer.Print "^FO50,200^XGchnstr02,1,1^FS"
Printer.Print "^FO250,200^A040,40^FD2.20^FS"
Printer.Print "^FO50,250^XGchnstr03,1,1^FS"
Printer.Print "^FO50,300^XGchnstr04,1,1^FS"
Printer.Print "^PQ1^FS"
Printer.Print "^XZ"
Printer.EndDoc
End Sub
这是一段控制ZEBRA标签打印机的过程,其中GETFONTHEX是DLL函数。
Private Sub Command1_Click()
Dim MAX_BUFFER As Integer, nCount As Integer
Dim cBuf As String * 21000
Dim I As Integer
nCount = GETFONTHEX("钙奶片", "宋体", "chnstr01", 0, 50, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
nCount = GETFONTHEX("金额(¥)", "宋体", "chnstr02", 0, 40, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
nCount = GETFONTHEX("三联商业公司", "宋体", "chnstr03", 0, 40, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
nCount = GETFONTHEX("银座超市", "宋体", "chnstr04", 0, 40, 0, 1, 0, cBuf)
Printer.Print Mid(cBuf, 1, nCount)
Printer.EndDoc
Printer.Print "^XA^LH10,10"
Printer.Print "^FO100,20^XGchnstr01,1,1^FS"
Printer.Print "^FO20,100^BEN,60,Y,N^FD123456789012^FS"
Printer.Print "^FO50,200^XGchnstr02,1,1^FS"
Printer.Print "^FO250,200^A040,40^FD2.20^FS"
Printer.Print "^FO50,250^XGchnstr03,1,1^FS"
Printer.Print "^FO50,300^XGchnstr04,1,1^FS"
Printer.Print "^PQ1^FS"
Printer.Print "^XZ"
Printer.EndDoc
End Sub