以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  这段VB里的代码要如何转换成狐表的全局代码呢?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=33456)

--  作者:晕了快扶我
--  发布时间:2013/5/18 14:44:00
--  这段VB里的代码要如何转换成狐表的全局代码呢?

Private Declare Function PTK_Getinfo Lib "WINPSK.dll" () As Integer
Private Declare Function PTK_SetPrintSpeed Lib "WINPSK.dll" (ByVal speed As Integer) As Long
Private Declare Function PTK_SetDarkness Lib "WINPSK.dll" (ByVal darkness As Integer) As Long
Private Declare Function PTK_ClearBuffer Lib "WINPSK.dll" () As Long
Private Declare Function PTK_DrawBarcode Lib "WINPSK.dll" (ByVal px As Long, ByVal PY As Long, ByVal pdirec As Long, ByVal typee As String, ByVal NarrowWidth As Long, ByVal pHorizontal As Long, ByVal pVertical As Long, ByVal ptext As Byte, ByVal pstr As String) As Long
Private Declare Function OpenPort Lib "WINPSK.dll" (ByVal OP As String) As Long
Private Declare Sub ClosePort Lib "WINPSK.dll" ()
Private Declare Function PTK_DrawTextTrueTypeW Lib "WINPSK.dll" (ByVal x As Long, ByVal y As Long, ByVal FHeight As Long, ByVal FWidth As Long, ByVal FType As String, ByVal Fspin As Long, ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, ByVal FStrikeOut As Long, ByVal id_name As String, ByVal data As String) As Long
Private Declare Function PTK_PcxGraphicsDel Lib "WINPSK.dll" (ByVal pid As String) As Long
Private Declare Function PTK_PcxGraphicsDownload Lib "WINPSK.dll" (ByVal pcxname As String, ByVal pcxpath As String) As Long
Private Declare Function PTK_PrintLabel Lib "WINPSK.dll" (ByVal number As Integer, ByVal cpnumber As Integer) As Long
Private Declare Function PTK_PrintPCX Lib "WINPSK.dll" (ByVal px As Integer, ByVal PY As Integer, ByVal filename As String) As Long
Private Declare Function PTK_DrawPcxGraphics Lib "WINPSK.dll" (ByVal x As Long, ByVal y As Long, ByVal gname As String) As Long
Private Declare Function PTK_DrawLineOr Lib "WINPSK.dll" (ByVal px As Integer, ByVal PY As Integer, ByVal plength As Integer, ByVal pH As Integer) As Long
Private Declare Function GetErrState Lib "WINPSK.dll" () As Integer
Private Declare Function PTK_SetLabelHeight Lib "WINPSK.dll" (ByVal lheight As Integer, ByVal gapH As Integer) As Integer
Private Declare Function PTK_SetLabelWidth Lib "WINPSK.dll" (ByVal lwidth As Integer) As Integer
Private Declare Function SetPCComPort Lib "WINPSK.dll" (ByVal BaudRate As Integer, ByVal HandShake As Boolean) As Integer
Private Declare Function PTK_DrawText Lib "WINPSK.dll" (ByVal px As Integer, ByVal PY As Integer, ByVal pdirec As Integer, ByVal pFont As Integer, ByVal pHorizontal As Integer, ByVal pVertical As Integer, ByVal ptext As Byte, ByVal pstr As String) As Long
Private Declare Function PTK_DrawBar2D_Pdf417 Lib "WINPSK" (ByVal x As Integer, ByVal y As Integer, ByVal w As Integer, ByVal v As Integer, ByVal s As Integer, ByVal c As Integer, ByVal px As Integer, ByVal PY As Integer, ByVal r As Integer, ByVal l As Integer, ByVal t As Integer, ByVal o As Integer, ByVal LRTSTR As String) As Long

 

是不是直接把Private换成Public就可以了?标红的这一段是否合法?


--  作者:晕了快扶我
--  发布时间:2013/5/18 14:45:00
--  

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:library and doc.rar

添加附件,dll和说明书..

希望有高手能指点下...


--  作者:Bin
--  发布时间:2013/5/18 15:20:00
--  
我也不是非常熟悉VB的语法,标红这部分你试试就知道是否可以.

其他的都是可以正常使用的,帮助中也有类似例子.

--  作者:晕了快扶我
--  发布时间:2013/5/18 15:53:00
--  
PTK_Getinfo 这个我在命令窗口点执行出现无法找到入口?是神马情况呢?
--  作者:Bin
--  发布时间:2013/5/18 15:54:00
--  
你的DLL文件有问题,或者名称什么的不对. 这个你应该去找他们的客服.