Foxtable(狐表)用户栏目专家坐堂 → 这段VB里的代码要如何转换成狐表的全局代码呢?


  共有5417人关注过本帖树形打印复制链接

主题:这段VB里的代码要如何转换成狐表的全局代码呢?

帅哥哟,离线,有人找我吗?
晕了快扶我
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1207 积分:7224 威望:0 精华:0 注册:2013/3/4 18:02:00
这段VB里的代码要如何转换成狐表的全局代码呢?  发帖心情 Post By:2013/5/18 14:44:00 [只看该作者]

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就可以了?标红的这一段是否合法?


 回到顶部
帅哥哟,离线,有人找我吗?
晕了快扶我
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1207 积分:7224 威望:0 精华:0 注册:2013/3/4 18:02:00
  发帖心情 Post By:2013/5/18 14:45:00 [只看该作者]

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

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

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


 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2013/5/18 15:20:00 [只看该作者]

我也不是非常熟悉VB的语法,标红这部分你试试就知道是否可以.

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

 回到顶部
帅哥哟,离线,有人找我吗?
晕了快扶我
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1207 积分:7224 威望:0 精华:0 注册:2013/3/4 18:02:00
  发帖心情 Post By:2013/5/18 15:53:00 [只看该作者]

PTK_Getinfo 这个我在命令窗口点执行出现无法找到入口?是神马情况呢?

 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2013/5/18 15:54:00 [只看该作者]

你的DLL文件有问题,或者名称什么的不对. 这个你应该去找他们的客服.

 回到顶部