电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

C#条型码生成源代码

17页
  • 卖家[上传人]:豆浆
  • 文档编号:10488357
  • 上传时间:2017-10-09
  • 文档格式:DOC
  • 文档大小:87KB
  • / 17 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 1、ASP.net(c#)生成条形码using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partial class _Default : System.Web.UI.Pageprotected void Page_Load(object sender, EventArgs e)Response.Write(bar_code(, 100, 1, 2);public string bar_code(object str, int ch, int cw, int type_code)/str:输入的字符串;ch:要显示条形码的高度;cw:要显示条形码的宽度;type_code:代码类型s

      2、tring strTmp = str.ToString();string code = strTmp;/ ToLower()将 string 转化成小写形式的副本,返回是使用指定区域的性的大小写规则。strTmp = strTmp.ToLower();int height = ch;int width = cw;/将传入的参数进行转化。strTmp = strTmp.Replace(0, _|_|_|_|_|); ;strTmp = strTmp.Replace(1, _|_|_|_|_|);strTmp = strTmp.Replace(2, _|_|_|_|_|);strTmp = strTmp.Replace(3, _|_|_|_|_|);strTmp = strTmp.Replace(4, _|_|_|_|_|);strTmp = strTmp.Replace(5, _|_|_|_|_|);strTmp = strTmp.Replace(7, _|_|_|_|_|);strTmp = strTmp.Replace(6, _|_|_|_|_|);strTmp = strTmp.R

      3、eplace(8, _|_|_|_|_|);strTmp = strTmp.Replace(9, _|_|_|_|_|);strTmp = strTmp.Replace(a, _|_|_|_|_|);strTmp = strTmp.Replace(b, _|_|_|_|_|);strTmp = strTmp.Replace(c, _|_|_|_|_|);strTmp = strTmp.Replace(d, _|_|_|_|_|);strTmp = strTmp.Replace(e, _|_|_|_|_|);strTmp = strTmp.Replace(f, _|_|_|_|_|);strTmp = strTmp.Replace(g, _|_|_|_|_|);strTmp = strTmp.Replace(h, _|_|_|_|_|);strTmp = strTmp.Replace(i, _|_|_|_|_|);strTmp = strTmp.Replace(j, _|_|_|_|_|);strTmp = strTmp.Replace(k, _|_|_|_|_|);strTmp = s

      4、trTmp.Replace(l, _|_|_|_|_|);strTmp = strTmp.Replace(m, _|_|_|_|_|);strTmp = strTmp.Replace(n, _|_|_|_|_|);strTmp = strTmp.Replace(o, _|_|_|_|_|);strTmp = strTmp.Replace(p, _|_|_|_|_|);strTmp = strTmp.Replace(r, _|_|_|_|_|);strTmp = strTmp.Replace(q, _|_|_|_|_|);strTmp = strTmp.Replace(s, _|_|_|_|_|);strTmp = strTmp.Replace(t, _|_|_|_|_|);strTmp = strTmp.Replace(u, _|_|_|_|_|);strTmp = strTmp.Replace(v, _|_|_|_|_|);strTmp = strTmp.Replace(w, _|_|_|_|_|);strTmp = strTmp.Replace(x, _|_|_|_|_|);str

      5、Tmp = strTmp.Replace(y, _|_|_|_|_|);strTmp = strTmp.Replace(z, _|_|_|_|_|);strTmp = strTmp.Replace(-, _|_|_|_|_|);strTmp = strTmp.Replace(*, _|_|_|_|_|);strTmp = strTmp.Replace(/, _|_|_|_|_|);strTmp = strTmp.Replace(%, _|_|_|_|_|);strTmp = strTmp.Replace(+, _|_|_|_|_|);strTmp = strTmp.Replace(., _|_|_|_|_|);strTmp = strTmp.Replace(_, );strTmp = strTmp.Replace(|, );if (type_code = 1)return strTmp + + code;elsereturn strTmp;方法二:using System.Drawing;public void CreateCodeLogo(string code)long len =

      6、 code.Length;string lastString = ;char list = new charlen + 1;list = code.ToCharArray();for (int i = 0; i 0)str += 0;len-;binary = str + binary;return (binary);protected void Button1_Click(object sender, EventArgs e)CreateCodeLogo(TextBox1.Text);C#打印条型码生成源程序 第一次在这里写东西,是想在这里认识更多的朋友,能与高手们交流,呵呵。 。这个程序是早此时候要用到条形码时到处找资料,受别人启发,自己尝试开发的简单测试程序,希望对有需要的朋友有所帮助,其实本人也算是的初学者,最近刚用它为公司开发了一个数据库应用程序呵呵 题外话就不多说了下面就将代码贴出来,自己看去吧谢谢大家,谢多多支持using System;using System.Drawing;using System.Collections;using System.Component

      7、Model;using System.Windows.Forms;using System.Data;using System.Runtime.InteropServices; namespace barcode/ / Form1 的摘要说明。/ public class Form1 : System.Windows.Forms.FormBitmap memoryImage ; DllImport(gdi32.dll)public static extern long BitBlt(IntPtr hdcDest, int NXDestt,int nYDest,int nWidth,int nHeight,IntPtr hdcSrc,int nXSrc,int nYSrc,System.Int32 dwRop);private System.Windows.Forms.LinkLabel linkLabel1;private System.Windows.Forms.GroupBox setbarcode;private System.Windows.Forms.TextBox barc

      8、odewide;private System.Windows.Forms.TextBox barcodeleng;private System.Windows.Forms.Label label8;private System.Windows.Forms.Label label7;private System.Windows.Forms.ComboBox to;private System.Windows.Forms.ComboBox line;private System.Windows.Forms.Label label5;private System.Windows.Forms.Label label4;private System.Windows.Forms.ComboBox stand2;private System.Windows.Forms.Label label3;private System.Windows.Forms.ComboBox stand;private System.Windows.Forms.Label label1;private System.Win

      9、dows.Forms.GroupBox groupBox2;private System.Windows.Forms.SaveFileDialog saveFileDialog1;private System.Drawing.Printing.PrintDocument printDocument1;private System.Windows.Forms.Label label2;private System.Windows.Forms.TextBox textBox1;private System.Windows.Forms.Button savebarcode;private System.Windows.Forms.Button printbarcode;private AxBARCODELib.AxBarCodeCtrl BarCode1;/ / 必需的设计器变量。/ private System.ComponentModel.Container components = null;public Form1()/ Windows 窗体设计器支持所必需的 /InitializeComponent();/ TODO: 在 InitializeComponent 调用后添加任何构造函数代码/ / 清理所有正在使用的资源。/ protecte

      《C#条型码生成源代码》由会员豆浆分享,可在线阅读,更多相关《C#条型码生成源代码》请在金锄头文库上搜索。

      点击阅读更多内容
    最新标签
    监控施工 信息化课堂中的合作学习结业作业七年级语文 发车时刻表 长途客运 入党志愿书填写模板精品 庆祝建党101周年多体裁诗歌朗诵素材汇编10篇唯一微庆祝 智能家居系统本科论文 心得感悟 雁楠中学 20230513224122 2022 公安主题党日 部编版四年级第三单元综合性学习课件 机关事务中心2022年全面依法治区工作总结及来年工作安排 入党积极分子自我推荐 世界水日ppt 关于构建更高水平的全民健身公共服务体系的意见 空气单元分析 哈里德课件 2022年乡村振兴驻村工作计划 空气教材分析 五年级下册科学教材分析 退役军人事务局季度工作总结 集装箱房合同 2021年财务报表 2022年继续教育公需课 2022年公需课 2022年日历每月一张 名词性从句在写作中的应用 局域网技术与局域网组建 施工网格 薪资体系 运维实施方案 硫酸安全技术 柔韧训练 既有居住建筑节能改造技术规程 建筑工地疫情防控 大型工程技术风险 磷酸二氢钾 2022年小学三年级语文下册教学总结例文 少儿美术-小花 2022年环保倡议书模板六篇 2022年监理辞职报告精选 2022年畅想未来记叙文精品 企业信息化建设与管理课程实验指导书范本 草房子读后感-第1篇 小数乘整数教学PPT课件人教版五年级数学上册 2022年教师个人工作计划范本-工作计划 国学小名士经典诵读电视大赛观后感诵读经典传承美德 医疗质量管理制度 2
    关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
    手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
    ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.