资源简介
c# 小票打印 佳博3120 源码
openport("Gprinter GP-3120TN"); //Open specified printer driver
// setup("35", "25", "4", "8", "0", "1", "0"); //Setup the media size and sensor type info
sendcommand("SIZE 30mm,37mm");
clearbuffer();
sendcommand("SET PEEL ON ");
sendcommand(" SET TEAR ON ");
sendcommand(" SET STRIPPER ON ");
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender EventArgs e)
{
openport(“Gprinter GP-3120TN“); //Open specified printer driver
// setup(“35“ “25“ “4“ “8“ “0“ “1“ “0“); //Setup the media size and sensor type info
sendcommand(“SIZE 30mm37mm“);
clearbuffer();
sendcommand(“SET PEEL ON “);
sendcommand(“ SET TEAR ON “);
sendcommand(“ SET STRIPPER ON “);
// sendcommand(“HOME“);
//Clear image buffer
// barcode(“10“ “50“ “128“ “50“ “1“ “0“ “2“ “2“ “010101“); //Drawing barcode
// printerfont(“30“ “25“ “3“ “0“ “1“ “1“ “158528552 “); //Drawing printer font
windowsfont(25 2 38 0 2 0 “ARIAL“ “贵阳机场中转“);
windowsfont(42 38 35 0 2 0 “ARIAL“ “电子消费券“);
windowsfont(20 65 30 0 2 0 “ARIAL“ “欢迎选择贵阳中转“);
windowsfont(15 90 30 0 2 0 “ARIAL“ “凭密码:12345678“); //我们提供价值48元就餐券
windowsfont(15 115 24 0 0 0 “ARIAL“ “到以下地点消费免48元“); //凭消费密码:1213456789
windowsfont(12 140 24 0 0 0 “ARIAL“ “1.雅品快港自助餐(连廊)“);
windowsfont(12 165 24 0 0 0 “ARIAL“ “2.仙姆莱克咖啡(C指廊)“);
windowsfont(12 190 24 0 0 0 “ARIAL“ “3.欧迪咖啡厅(C指廊)“);
windowsfont(12 215 22 0 0 0 “ARIAL“ “4.雅品茶餐厅(二楼D岛旁)“);
// windowsfont(180 175 24 0 0 0 “ARIAL“ “121345678“);
barcode(“40“ “240“ “128“ “30“ “1“ “0“ “2“ “2“ “12345678“);
// windowsfont(30 200 24 0 0 0 “ARIAL“ “4.雅品茶餐厅(二楼D岛旁)“);
// sendcommand(“ SET STRIPPER ON “);
printlabel(“1“ “1“); //Print labels
closeport();
}
[DllImport(“TSCLIB.dll“ EntryPoint = “about“)]
public static extern int about();
[DllImport(“TSCLIB.dll“ EntryPoint = “openport“)]
public static extern int openport(string printername);
[DllImport(“TSCLIB.dll“ EntryPoint = “barcode“)]
public static extern int barcode(string x string y string type
string height string readable string rotation
string narrow string wide string code);
[DllImport(“TSCLIB.dll“ EntryPoint = “clearbuffer“)]
public static extern int clearbuffer();
[DllImpor
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 74240 2010-07-20 09:49 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\TSCLib.dll
文件 11264 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 28160 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 11600 2014-07-09 15:32 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2010-03-17 22:39 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 5229 1996-05-09 08:49 WindowsFormsApplication1\WindowsFormsApplication1\bin\UL.PCX
文件 6751 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
文件 3913 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
文件 5817 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
文件 4440 2014-07-07 15:56 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6478 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 588 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.read.1.tlog
文件 1342 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog
文件 7897 2014-07-07 15:56 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\ResolveAssemblyReference.cache
文件 1564 2014-07-09 15:32 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 11264 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe
文件 180 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Form1.resources
文件 28160 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb
文件 180 2014-07-02 17:27 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources
文件 505 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Program.cs
文件 1390 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs
文件 2899 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs
文件 5612 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx
文件 1110 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.Designer.cs
文件 249 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.settings
文件 40960 2007-04-23 22:06 WindowsFormsApplication1\WindowsFormsApplication1\TSCLib.dll
文件 3707 2014-07-02 16:42 WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj
文件 914 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1.sln
..A..H. 22528 2014-07-09 15:31 WindowsFormsApplication1\WindowsFormsApplication1.suo
目录 0 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\TempPE
............此处省略11个文件信息
相关资源
- C# 调用win32 api函数-user32.dll详细说明
- C# 调用BarTender打印条码DEMO
- 大型比赛竞赛抽签系统 可打印 c# vs
- C#编写的Gerber查看器
- lua C# .Net4.0 vs2010 LuaInterface
- C#十六进制编辑器
- 明华URF-35H读卡器 C#读写源码 为大家
- C#文件流读取CSV文件
- c#读写PDF文件sql
- C# winform Socket大文件传输
- c#车牌识别系统附30张测试图片
- 《C#面向对象程序设计》源代码(CS)
- 金旭亮《C#面向对象程序设计》教案
- 试题库管理系统毕业论文(C#)源程序
- 学校网站原代码(C#.NET)
- C#-数据库操作技术-员工管理系统
- c#web开发入门经典
- C#与Matlab混合编程的几种方式
- c# 开发与 mysql数据库实现的增删改查
- C#异步操作 异步查询数据库 异步处理
- Basler相机通过IO触发源码
- [源代码] 《领域驱动设计 (C# 2008 实
- 松下PLC与C#通讯串口调试入门教程.z
- USB 继电器控制器 LCUS-1 保证能用 c#
- C# AES加密解密小工具
- C#圆形按钮,非常漂亮动态~~
- [精]C#仿QQ右下角弹出提示框()
- C#进程间通信-共享内存代码
- 有史以来最简单的三层(C#)
- vb调用c#编写的串口DLL文件(vb源码
评论
共有 条评论