資源簡介
內含標簽打印機的實例 包括B/S 和C/S的
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Runtime.InteropServices;
namespace?FormActive
{
????public?class?CallOutPrint
????{
????????[DllImport(“zebracom.dll“?EntryPoint?=?“VS_PortOpen“?SetLastError?=?true?CharSet?=?CharSet.Ansi?CallingConvention?=?CallingConvention.StdCall)]
????????private?static?extern?int?VS_PortOpen(int?Port?int?BaudSpeed);
????????///?
????????///?打開通訊端口函數
????????///?
????????///?打開通訊端口(1-并口一;2-并口二;3-串口一;4-串口二?5-usb)
????????///?串口速率(96001920038400)?
????????///?0?正常返回 -1?打開端口出錯
????????public?static?int?PortOpen(int?Port?int?BaudSpeed)
????????{
????????????int?r?=?-1;
????????????try
????????????{
????????????????r?=?VS_PortOpen(Port?BaudSpeed);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????throw?new?Exception(“PortOpen出錯Port:“?+?Port?+?“BaudSpeed:“?+?BaudSpeed?+?“錯誤:“?+?ex.Message);
????????????????//RecordLog.writeFile(LogTypeEnum.Error?“PortOpen出錯Port:“?+?Port?+?“BaudSpeed:“?+?BaudSpeed?+?“錯誤:“?+?ex.Message);
????????????}
????????????return?r;
????????}
????????[DllImport(“zebracom.dll“?EntryPoint?=?“VS_SetPrintXY“?SetLastError?=?true?CharSet?=?CharSet.Ansi?CallingConvention?=?CallingConvention.StdCall)]
????????private?static?extern?int?VS_SetPrintXY(int?iX?int?iY);
????????///?
????????///?設置打印機的坐標圓點函數
????????///?
????????///?打印區域水平起始位置
????????///?打印區域垂直起始位置
????????///?
????????public?static?int?SetPrintXY(int?x?int?y)
????????{
????????????int?r?=?-1;
????????????try
????????????{
????????????????r?=?VS_SetPrintXY(x?y);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????throw?new?Exception(“SetPrintXY錯誤:“?+?ex.Message);
????????????????//RecordLog.writeFile(LogTypeEnum.Error?“SetPrintXY錯誤:“?+?ex.Message);
????????????}
????????????return?r;
????????}
????????[DllImport(“zebracom.dll“?EntryPoint?=?“VS_SetPrintBack“?SetLastError?=?true?CharSet?=?CharSet.Ansi?CallingConvention?=?CallingConvention.StdCall)]
????????private?static?extern?int?VS_SetPrintBack(int?iBack);
????????///?
????????///?設置打印機每次打印是否都要回退函數
????????///?
????????///?回退標志(0-回退(默認),1-不回退)
????????///?0?成功 -1?失敗
????????public?static?int?SetPrintBack(int?iBack)
????????{
????????????int?r?=?-1;
????????????try
????????????{
????????????????r?=?VS_SetPrintBack(iBack);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????throw?new?Exception(“SetPrintBack錯誤:“?+?ex.Message);
????????????????//RecordLog.writeFile(LogTypeEnum.Error?“SetPrintBack錯誤:“?+?ex.Message);
????????????}
????????????return?r;
????????}
????????[DllImport(“zebracom.dll“?EntryPoint?=?“VS_SetDark
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2495??2009-12-18?17:57??Web調用activex打印條碼示例\CallDelphiPrintBar.aspx
?????文件???????2837??2009-12-17?16:25??Web調用activex打印條碼示例\CallDelphiPrintBar.aspx.cs
?????文件?????460800??2009-12-18?17:41??Web調用activex打印條碼示例\setup.exe
?????文件?????342528??2009-12-18?17:41??Web調用activex打印條碼示例\Setupbar.msi
?????文件????????213??2013-10-22?16:00??說明.txt
?????文件??????14336??2009-12-18?17:53??FormActive\FormActive\bin\Debug\FormActive.dll
?????文件??????34304??2009-12-18?17:53??FormActive\FormActive\bin\Debug\FormActive.pdb
?????文件???????3684??2009-12-18?17:53??FormActive\FormActive\bin\Debug\FormActive.tlb
?????文件???????1082??2009-12-17?18:43??FormActive\FormActive\bin\Debug\LogFile\2009-12-17日志文件.log
?????文件????????444??2009-12-18?17:35??FormActive\FormActive\bin\Debug\LogFile\2009-12-18日志文件.log
?????文件??????36864??2006-10-30?15:49??FormActive\FormActive\bin\Debug\zebracom.dll
?????文件??????14431??2009-12-18?14:50??FormActive\FormActive\CallOutPrint.cs
?????文件???????3136??2009-12-17?18:40??FormActive\FormActive\FormActive.csproj
?????文件????????168??2009-12-17?18:40??FormActive\FormActive\FormActive.csproj.user
?????文件????????805??2009-12-18?17:53??FormActive\FormActive\obj\Debug\FormActive.csproj.FileListAbsolute.txt
?????文件????????781??2009-12-18?17:53??FormActive\FormActive\obj\Debug\FormActive.csproj.GenerateResource.Cache
?????文件??????14336??2009-12-18?17:53??FormActive\FormActive\obj\Debug\FormActive.dll
?????文件??????34304??2009-12-18?17:53??FormActive\FormActive\obj\Debug\FormActive.pdb
?????文件????????180??2009-12-18?17:53??FormActive\FormActive\obj\Debug\FormActive.UserControl1.resources
?????文件????????589??2009-12-18?17:53??FormActive\FormActive\obj\FormActive.csproj.UnmanagedRegistration.cache
?????文件???????1444??2009-12-17?18:11??FormActive\FormActive\Properties\AssemblyInfo.cs
?????文件???????3565??2009-12-17?18:40??FormActive\FormActive\RecordLog.cs
?????文件??????14297??2009-12-18?17:53??FormActive\FormActive\UserControl1.cs
?????文件???????3104??2009-12-18?10:06??FormActive\FormActive\UserControl1.Designer.cs
?????文件???????5814??2009-12-18?10:06??FormActive\FormActive\UserControl1.resx
?????文件????????920??2009-12-17?17:03??FormActive\FormActive.sln
????..A..H.?????22016??2009-12-18?17:54??FormActive\FormActive.suo
?????文件??????33280??2009-12-18?16:38??FormPrintBarCode\FormPrintBarCode\bin\Debug\FormPrintBarCode.exe
?????文件??????42496??2009-12-18?16:38??FormPrintBarCode\FormPrintBarCode\bin\Debug\FormPrintBarCode.pdb
?????文件??????14328??2009-12-18?17:14??FormPrintBarCode\FormPrintBarCode\bin\Debug\FormPrintBarCode.vshost.exe
............此處省略58個文件信息
- 上一篇:C# TCP服務器客戶端通訊源碼
- 下一篇:基于C#的波形顯示控件的實現源碼
評論
共有 條評論