|
如何在FOXPRO的REPORT中實現列印條碼功能
来源:不详 作者 佚名 点击数: 录入时间:07-12-20 10:11:52
如何在FOXPRO的REPORT中實現列印條碼功能
作者﹕CCBZZP
以下是我以前做的一個在FOXPRO的FORM調用REPORT中實現列印條碼功能(主要是39條碼), 現在將代碼共享給大家,希望能給各位帶來幫助!
1. 首先將字体文件C39HDW3.TTF拷貝到你的電腦的FONTS目錄下. 2. 在窗体FORM中新增加兩個程序BC_CODE39和BC_OCODE39 3. 程序BC_CODE39的內容是: Parameters m rtnp = THISFORM.BC_OCode39(m,"Basic",0) return rtnp 4. 程序BC_OCODE39的內容是: Parameters m,full,check private t,x,p,cval,chktot set talk off if type('m')<>"C" return "" endif *** verify full parameter if type('full')<>"C" full = "BASIC" cval = 2 else full = upper(full) if full<>"FULL" full = "BASIC" cval = 2 else cval = 3 endif endif
*** verify check parameter if type('check')<>'N' check = 0 else if check <> 1 check = 0 endif endif
*** Check to see if user added stop/start *** character and returns null if true if at("*"," "+m)>1 return "" endif
*** decode message into bar code character pattern and place *** it into the variable
* initialize the output string and add the start code to it p="*"
[1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页
|