资源简介
内含标签打印机的实例 包括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#的波形显示控件的实现源码
相关资源
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
评论
共有 条评论