请问在C#中如何将价格显示在超市收银机的显示屏上??? 价格显示屏,一般通过对串口传输字符集实现;打印中文,一般是要打印机带硬字库的。(与不带中文字库的价格差不了多少) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我做过并口的点阵显示屏的开发,其实没有那么难,主要是看显示屏是并口的还是串口的,串口的比较简单,应该有接口之类的东西给你,如果你是从底层开发的话,你再联系我,发留言给我也行 private const uint GENERIC_WRITE = 0x40000000;private const int OPEN_EXISTING = 3;bufferOpenBox = new char[]{Char27,Convert.ToChar(112),Convert.ToChar(0),Convert.ToChar(127),Convert.ToChar(254)};//开箱bufferViewReturn = new Char[]{Char27,Convert.ToChar(115),Convert.ToChar(4)}; //使显示屏的状态显示为找回public void LPTAction(char[] tmpBuffer){string LPT="LPT1";//若改為COM1,就可以操作COM1int hPort= CreateFile(LPT,GENERIC_WRITE,0, 0,OPEN_EXISTING,0,0); System.IntPtr hPortP=new IntPtr(hPort);FileStream fs;fs = new FileStream(hPortP, FileAccess.Write, false); StreamWriter writer=new StreamWriter(fs);writer.AutoFlush=false;writer.Write(tmpBuffer);writer.Flush();writer.Close();fs.Close();CloseHandle(hPort);}分别执行这两条命令的时候,现在只能开箱,显示屏的状态并没有改变?是不是还有其他的东西要设?thx 老问题了,GDI+一般性错误 高手这边有请,如何提取资源文件 关于C#的问题 C#用户控件问题 FtpWebRequest问题 关于C#算法问题 使用NHeibernate是不是一定要使用泛型? 关于main( string args )的棘手问题 Ado.net问题,为什么运行这断代码出错,请微软专家告诉我答案!弄了一个中午也没弄明白,再没有结果就死定了!!! 如何截获系统热键 比较时间的问题? 怎么检查一个对象是否存在???
private const int OPEN_EXISTING = 3;bufferOpenBox = new char[]{Char27,Convert.ToChar(112),Convert.ToChar(0),Convert.ToChar(127),Convert.ToChar(254)};//开箱bufferViewReturn = new Char[]{Char27,Convert.ToChar(115),Convert.ToChar(4)}; //使显示屏的状态显示为找回
public void LPTAction(char[] tmpBuffer)
{
string LPT="LPT1";//若改為COM1,就可以操作COM1
int hPort= CreateFile(LPT,GENERIC_WRITE,0, 0,OPEN_EXISTING,0,0);
System.IntPtr hPortP=new IntPtr(hPort);
FileStream fs;
fs = new FileStream(hPortP, FileAccess.Write, false);
StreamWriter writer=new StreamWriter(fs);
writer.AutoFlush=false;
writer.Write(tmpBuffer);
writer.Flush();
writer.Close();
fs.Close();
CloseHandle(hPort);
}分别执行这两条命令的时候,现在只能开箱,显示屏的状态并没有改变?
是不是还有其他的东西要设?thx