TSCLIB.DLL 函式庫使用說明_第1頁
TSCLIB.DLL 函式庫使用說明_第2頁
TSCLIB.DLL 函式庫使用說明_第3頁
TSCLIB.DLL 函式庫使用說明_第4頁
TSCLIB.DLL 函式庫使用說明_第5頁
已閱讀5頁,還剩5頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、TSCLIB.DLL 函式庫使用說明請於使用TSCLIB.DLL前,安裝條碼印表機(jī)驅(qū)動程式。1. openport(a)說明: 指定電腦端的輸出埠參數(shù): a: 單機(jī)列印時(shí),請指定印表機(jī)驅(qū)動程式名稱,例如: TSC CLEVER TTP-243 若連接印表機(jī)伺服器,請指定伺服器路徑及共用印表機(jī)名稱,例如: SERVERTTP2432. closeport()說明: 關(guān)閉指定的電腦端輸出埠參數(shù): 無3. setup(a,b,c,d,e,f,g)說明: 設(shè)定標(biāo)籤的寬度、高度、列印速度、列印濃度、感應(yīng)器類別、gap/black mark 垂直間距、gap/black mark 偏移距離)參數(shù): a:

2、字串型別,設(shè)定標(biāo)籤寬度,單位 mmb: 字串型別,設(shè)定標(biāo)籤高度,單位 mmc: 字串型別,設(shè)定列印速度,(列印速度隨機(jī)型不同而有不同的選項(xiàng))1.0: 每秒1.0吋列印速度1.5: 每秒1.5吋列印速度2.0: 每秒2.0吋列印速度3.0: 每秒3.0吋列印速度4.0: 每秒4.0吋列印速度5.0: 每秒5.0吋列印速度6.0: 每秒6.0吋列印速度d: 字串型別,設(shè)定列印濃度,015,數(shù)字愈大列印結(jié)果愈黑e: 字串型別,設(shè)定使用感應(yīng)器類別0 表示使用垂直間距感測器(gap sensor) 1 表示使用黑標(biāo)感測器(black mark sensor)f: 字串型別,設(shè)定gap/black mar

3、k 垂直間距高度,單位: mmg: 字串型別,設(shè)定gap/black mark 偏移距離,單位: mm,此參數(shù)若使用一般標(biāo)籤時(shí)均設(shè)為04. clearbuffer()說明: 清除參數(shù): 無5. barcode(a,b,c,d,e,f,g,h,I)說明: 使用條碼機(jī)內(nèi)建條碼列印參數(shù): a: 字串型別,條碼X方向起始點(diǎn),以點(diǎn)(point)表示。(200 DPI,1點(diǎn)=1/8 mm, 300 DPI,1點(diǎn)=1/12 mm)b: 字串型別,條碼Y方向起始點(diǎn),以點(diǎn)(point)表示。(200 DPI,1點(diǎn)=1/8 mm, 300 DPI,1點(diǎn)=1/12 mm)c: 字串型別,128Code 128, s

4、witching code subset A, B, C automatically 128MCode 128, switching code subset A, B, C manually.EAN128Code 128, switching code subset A, B, C automatically25Interleaved 2 of 525CInterleaved 2 of 5 with check digits39Code 3939CCode 39 with check digits93Code 93 EAN13EAN 13EAN13+2EAN 13 with 2 digits

5、add-onEAN13+5EAN 13 with 5 digits add-onEAN8EAN 8 EAN8+2EAN 8 with 2 digits add-onEAN8+5EAN 8 with 5 digits add-onCODACodabarPOSTPostnetUPCAUPC-AUPCA+2UPC-A with 2 digits add-onUPCA+5UPC-A with 5 digits add-onUPCEUPC-E UPCE+2UPC-E with 2 digits add-onUPCE+5UPC-E with 5 digits add-ond: 字串型別,設(shè)定條碼高度,高度

6、以點(diǎn)來表示e: 字串型別,設(shè)定是否列印條碼碼文0: 不列印碼文1: 列印碼文f: 字串型別,設(shè)定條碼旋轉(zhuǎn)角度0: 旋轉(zhuǎn)0度90: 旋轉(zhuǎn)90度180: 旋轉(zhuǎn)180度270: 旋轉(zhuǎn)270度g: 字串型別,設(shè)定條碼窄bar 比例因子,請參考TSPL使用手冊h: 字串型別,設(shè)定條碼窄bar 比例因子,請參考TSPL使用手冊I: 字串型別,條碼內(nèi)容6. printerfont(a,b,c,d,e,f,g)說明: 使用條碼機(jī)內(nèi)建文字列印參數(shù): a: 字串型別,文字X方向起始點(diǎn),以點(diǎn)(point)表示。(200 DPI,1點(diǎn)=1/8 mm, 300 DPI,1點(diǎn)=1/12 mm)b: 字串型別,文字Y方向起

7、始點(diǎn),以點(diǎn)(point)表示。(200 DPI,1點(diǎn)=1/8 mm, 300 DPI,1點(diǎn)=1/12 mm)c: 字串型別,內(nèi)建字型名稱,共12種。1: 8*/12 dots2: 12*20 dots3: 16*24 dots4: 24*32 dots5: 32*48 dotsTST24.BF2: 繁體中文24*24 TST16.BF2: 繁體中文16*16TTT24.BF2: 繁體中文24*24 (電信碼)TSS24.BF2: 簡體中文24*24TSS16.BF2: 簡體中文16*16K: 韓文 24*24L: 韓文 16*16d: 字串型別,設(shè)定文字旋轉(zhuǎn)角度0: 旋轉(zhuǎn)0度90: 旋轉(zhuǎn)90度

8、180: 旋轉(zhuǎn)180度270: 旋轉(zhuǎn)270度e: 字串型別,設(shè)定文字X方向放大倍率,18f: 字串型別,設(shè)定文字X方向放大倍率,18g: 字串型別,列印文字內(nèi)容7. sendcommand(command)說明: 送內(nèi)建指令到條碼印表機(jī)參數(shù): 詳細(xì)指令請參考TSPL8. printlabel(a,b)說明: 列印標(biāo)籤內(nèi)容參數(shù): a: 字串型別,設(shè)定列印標(biāo)籤式數(shù)(set)b: 字串型別,設(shè)定列印標(biāo)籤份數(shù)(copy)9. downloadpcx(a,b)說明:下載單色PCX 格式圖檔至印表機(jī)參數(shù): a: 字串型別,檔案名(可包含路徑)b: 字串型別,下載至印表機(jī)記憶體內(nèi)之檔名(請使用大寫檔名)10

9、. formfeed()說明: 跳頁,該函式需在setup後使用參數(shù): 無11. nobackfeed()說明: 設(shè)定紙張不回吐參數(shù): 無12. windowsfont(a,b,c,d,e,f,g,h)說明: 使用Windows TTF字型列印文字參數(shù): a: 整數(shù)型別,文字X方向起始點(diǎn),以點(diǎn)(point)表示。b: 整數(shù)型別,文字Y方向起始點(diǎn),以點(diǎn)(point)表示。c: 整數(shù)型別,字體高度,以點(diǎn)(point)表示。d: 整數(shù)型別,旋轉(zhuǎn)角度,逆時(shí)鐘方向旋轉(zhuǎn)0 -> 0 degree90-> 90 degree180-> 180 degree270-> 270 degr

10、eee: 整數(shù)型別,字體外形0-> 標(biāo)準(zhǔn)(Normal)1-> 斜體(Italic)2-> 粗體(Bold)3-> 粗斜體(Bold and Italic)f: 整數(shù)型別, 底線0-> 無底線1-> 加底線g: 字串型別,字體名稱。如: Arial, Times new Roman, 細(xì)名體, 標(biāo)楷體h: 字串型別,列印文字內(nèi)容。13. about()說明: 顯示DLL 版本號碼參數(shù): 無Visual Basic 5.0, 6.0 for Win95, 98範(fàn)例Private Declare Sub openport Lib "c:windowss

11、ystemtsclib.dll" (ByVal PrinterName As String)Private Declare Sub closeport Lib "c:windowssystemtsclib.dll" ()Private Declare Sub sendcommand Lib "c:windowssystemtsclib.dll" ( _ ByVal command As String)Private Declare Sub setup Lib "c:windowssystemtsclib.dll" ( _ B

12、yVal LabelWidth As String, _ ByVal LabelHeight As String, _ ByVal Speed As String, _ ByVal Density As String, _ ByVal Sensor As String, _ ByVal Vertical As String, _ ByVal Offset As String)Private Declare Sub downloadpcx Lib "c:windowssystemtsclib.dll" ( _ ByVal Filename As String, _ ByVal

13、 ImageName As String)Private Declare Sub barcode Lib "c:windowssystemtsclib.dll" ( _ ByVal X As String, _ ByVal Y As String, _ ByVal CodeType As String, _ ByVal Height As String, _ ByVal Readable As String, _ ByVal rotation As String, _ ByVal Narrow As String, _ ByVal Wide As String, _ ByV

14、al Code As String)Private Declare Sub printerfont Lib "c:windowssystemtsclib.dll" ( _ ByVal X As String, _ ByVal Y As String, _ ByVal FontName As String, _ ByVal rotation As String, _ ByVal Xmul As String, _ ByVal Ymul As String, _ ByVal Content As String)Private Declare Sub clearbuffer Li

15、b "c:windowssystemtsclib.dll" ()Private Declare Sub printlabel Lib "c:windowssystemtsclib.dll" ( _ ByVal NumberOfSet As String, _ ByVal NumberOfCopy As String)Private Declare Sub formfeed Lib "c:windowssystemtsclib.dll" ()Private Declare Sub nobackfeed Lib "c:windo

16、wssystemtsclib.dll" ()Private Declare Sub windowsfont Lib "c:windowssystemtsclib.dll" ( _ ByVal X As Integer, _ ByVal Y As Integer, _ ByVal fontheight As Integer, _ ByVal rotation As Integer, _ ByVal fontstyle As Integer, _ ByVal fontunderline As Integer, _ ByVal FaceName As String, _

17、 ByVal TextContent As String)Private Sub Command1_Click()Call openport(“TSC TTP-243”)Call openport(“serverTTP243”)Call setup("100", "100", "3", "10", "0", "0", "0")Call clearbufferCall downloadpcx("c:UL.PCX", "UL.PC

18、X")Call downloadpcx(App.Path + "UL.PCX", "UL")ComText = "PUTPCX 100,400," + Chr(34) + "UL" + Chr(34) Call sendcommand(ComText)Call printerfont("10", "10", "4", "0", "1", "1", "TEST PRINTOUT&

19、quot;)Call barcode("10", "80", "39", "96", "1", "0", "2", "4", "0987654321")Call sendcommand("PUTPCX 100,250,""UL.PCX""")Call sendcommand("BAR 400,200,300,100")Call sendc

20、ommand("BOX 10,300,300,300,5")Call windowsfont(10, 500, 80, 0, 0,0, "標(biāo)楷體", "標(biāo)楷體字型")Call printlabel("1", "1")Call closeportEnd Sub FoxPro 範(fàn)例declare openport in c:windowssystemtsclib.dll stringdeclare closeport in c:windowssystemtsclib.dlldeclare sendc

21、ommand in c:windowssystemtsclib.dll declare setup in c:windowssystemtsclib.dll string,string,string,string,string,string,stringdeclare downloadpcx in c:windowssystemtsclib.dll string, stringdeclare barcode in c:windowssystemtsclib.dll string,string,string,string,string,string,string,string,stringdec

22、lare printerfont in c:windowssystemtsclib.dll string,string,string,string,string,string,stringdeclare clearbuffer in c:windowssystemtsclib.dlldeclare printlabel in c:windowssystemtsclib.dll string,stringdeclare formfeed in c:windowssystemtsclib.dll declare nobackfeed in c:windowssystemtsclib.dlldecl

23、are windowsfont in c:windowssystemtsclib.dll integer,integer,integer,integer,integer,integer,integer,string,string openport(“TSC TTP-243”)setup("32","25","2","10","0","0","0")clearbuffer()barcode("10","0","

24、;EAN13","80","1","0","2","4","123456789012")windowsfont(10,100,50,0,0,0,"標(biāo)楷體","標(biāo)楷體字型")printlabel("1","1")closeport()Delphi 宣告範(fàn)例procedure openport(PrinterName:pchar);stdcall;far; external tsclib.d

25、ll;procedure closeport; external tsclib.dll;procedure sendcommand(Command:pchar);stdcall;far;external tsclib.dll;procedure setup(LabelWidth, LabelHeight, Speed, Density, Sensor, Vertical, Offset:pchar);tsdcall; far; external tsclib.dll;procedure downloadpcx(Filename,ImageName:pchar);stdcall;far; ext

26、ernal tsclib.dll;procedure barcode(X, Y, CodeType, Height, Readable, Rotation, Narrow, Wide, Code :pchar); stdcall; far; external tsclib.dll;procedure printerfont(X, Y, FontName, Rotation, Xmul, Ymul, Content:pchar); stdcall;far; external tsclib.dll;procedure clearbuffer; external tsclib.dll;procedu

27、re printlabel(NumberOfSet, NumberOfCopoy:pchar);stdcall; far; external tsclib.dll;procedure formfeed;external tsclib.dll;procedure nobackfeed; external tsclib.dllprocedure windowsfont (X, Y, FontHeight, Rotation, FontStyle, FontUnderline : integer; FaceName, TextContect:pchar);stdcall;far;external t

28、sclib.dll;請注意: 函數(shù)名稱務(wù)必使用小寫字母 openport('TSC TTP/TDP-243(E)'); /sendcommand('Abcdvsafsfs'); Setup('50', '30', '3', '10', '0', '0', '0'); SendCommand('DIRECTION 0'); ClearBuffer(); WindowsFont(190,18, 45, 0, 0,0, 'Arial', 'ACC'); printlabel(1,1'); closeport;PB全局函數(shù)聲明:Function long openport (string a) library"tsclib.dll&quo

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論