超碰人人人人人,色婷婷综合久久久久中文一区二区,国产-第1页-浮力影院,欧美老妇另类久久久久久

LOGO OA教程 ERP教程 模切知識(shí)交流 PMS教程 CRM教程 開(kāi)發(fā)文檔 其他文檔  
 
網(wǎng)站管理員

用ASP進(jìn)行網(wǎng)絡(luò)打印功能

admin
2010年7月8日 1:3 本文熱度 6284
[p]<%@ language=vbscript %>[br]<%[br]option explicit[/p]
[p]dim strsubmit 'form中用來(lái)保存提交按鈕的值[br]dim strprinterpath 'form中保存網(wǎng)絡(luò)打印機(jī)路徑的值[br]dim strusername 'form中用戶名的值[br]dim strpassword 'form中密碼的值[br]dim strmessage 'form打印內(nèi)容的值[br]dim objfs 'vbscript中的文件系統(tǒng)對(duì)象[br]dim objwshnet 'wsh中的網(wǎng)絡(luò)對(duì)象[br]dim objprinter '打印對(duì)象[/p]
[p]strsubmit = request.form("submit")[br]%>[/p]
[p][br][br][br][br][/p]
[p]<%[br]if strsubmit = "" then[br]%>[/p]
[p]注意的是:[br]由于這是演示,其中有關(guān)nt的帳號(hào)和密碼都是使用了不加密的手段在asp中傳遞的[br]真正的運(yùn)用中應(yīng)該對(duì)該登錄過(guò)程進(jìn)行安全處理。[br]
[br][br][br][br][br][br][br][br][br][br][br][br][br][br][br][br][br][br][br][br][br][br]
網(wǎng)絡(luò)打印機(jī)路徑:
登錄帳號(hào):
登錄口令:
請(qǐng)輸入你想打印的文字:
[br]
[/p]
[p]當(dāng)以上信息被提交后,就可以按照下面的代碼進(jìn)行打印了。[br]<%[br]else[br]' 從form中取得響應(yīng)信息。[br]strprinterpath = request.form("printerpath")[br]strusername = request.form("username")[br]strpassword = request.form("password")[br]strmessage = request.form("message")[/p]
[p]we will now use the vbscript filesystemobject object and the wsh network object. the network object will[br]give us the methods we need to open a printer connection, and the filesystemobject will allow us to stream our[br]output to the printer. we create these objects in the following code example: [/p]
[p]set objfs = createobject("scripting.filesystemobject")[br]set objwshnet = createobject("wscript.network")[br]' 使用wsh連接網(wǎng)絡(luò)打印機(jī)[br]objwshnet.addprinterconnection "lpt1", strprinterpath, false, strusername, strpassword[br]' 使用文件系統(tǒng)對(duì)象將打印設(shè)備作為一個(gè)文件使用[br]set objprinter = objfs.createtextfile("lpt1:", true)[br]' 給打印設(shè)備送出文本[br]objprinter.write(strmessage)[br]'關(guān)閉打印設(shè)備對(duì)象并進(jìn)行錯(cuò)誤陷阱處理[br]on error resume next[br]objprinter.close[br]' 如果發(fā)生錯(cuò)誤,關(guān)閉打印連接,并輸出錯(cuò)誤信息[br]if err then[br]response.write ("error # " & cstr(err.number) & " " & err.description)[br]err.clear [br]else[br]' 操作成功,輸出確認(rèn)信息[br]response.write("
")[br]response.write("")[br]response.write("")[br]response.write("")[br]response.write("")[br]response.write("")[br]response.write("")[br]response.write("")[br]response.write("
打印消息送出:" & strmessage & "
網(wǎng)絡(luò)打印機(jī)路徑:" & strprinterpath & "
登錄帳號(hào):" & strusername & "
")[br]response.write("
")[br]end if[br]' 取消打印連接[br]objwshnet.removeprinterconnection "lpt1:"[br]set objwshnet = nothing[br]set objfs = nothing[br]set objprinter = nothing[br]end if[br]%>[br][br][/p]

該文章在 2010/7/8 1:03:23 編輯過(guò)
關(guān)鍵字查詢
相關(guān)文章
正在查詢...
點(diǎn)晴ERP是一款針對(duì)中小制造業(yè)的專(zhuān)業(yè)生產(chǎn)管理軟件系統(tǒng),系統(tǒng)成熟度和易用性得到了國(guó)內(nèi)大量中小企業(yè)的青睞。
點(diǎn)晴PMS碼頭管理系統(tǒng)主要針對(duì)港口碼頭集裝箱與散貨日常運(yùn)作、調(diào)度、堆場(chǎng)、車(chē)隊(duì)、財(cái)務(wù)費(fèi)用、相關(guān)報(bào)表等業(yè)務(wù)管理,結(jié)合碼頭的業(yè)務(wù)特點(diǎn),圍繞調(diào)度、堆場(chǎng)作業(yè)而開(kāi)發(fā)的。集技術(shù)的先進(jìn)性、管理的有效性于一體,是物流碼頭及其他港口類(lèi)企業(yè)的高效ERP管理信息系統(tǒng)。
點(diǎn)晴WMS倉(cāng)儲(chǔ)管理系統(tǒng)提供了貨物產(chǎn)品管理,銷(xiāo)售管理,采購(gòu)管理,倉(cāng)儲(chǔ)管理,倉(cāng)庫(kù)管理,保質(zhì)期管理,貨位管理,庫(kù)位管理,生產(chǎn)管理,WMS管理系統(tǒng),標(biāo)簽打印,條形碼,二維碼管理,批號(hào)管理軟件。
點(diǎn)晴免費(fèi)OA是一款軟件和通用服務(wù)都免費(fèi),不限功能、不限時(shí)間、不限用戶的免費(fèi)OA協(xié)同辦公管理系統(tǒng)。
Copyright 2010-2025 ClickSun All Rights Reserved