《拓文asp.net网站内容管理系统》官方演示站。
 设为首页  
 收藏本站
 作者:黄振安
 QQ:53854651
首 页 开源拓文.NET编程网站编程网页设计图形图像数据库软件工程留言本
    站内搜索:  
您现在的位置: 拓文网络 → .NET编程 → ASP.NET → C#条形码[正文]

热 门 文 章

相 关 文 章
  • ASP.NET性能优化
  • 在.NET框架应用程序中发送电子邮件
  • .net打包自动安装数据库
  • asp.net开发wap必备:更好的匹配手机设备
  • 用ashx动态生成文件
  • windows 2003下asp.Net站点无法使用用户名+密码的方
  • ASP.NET中17种正则表达式
  • 提高ASP.Net应用程序性能的十大方法
  • 一个通过web.Mail发送邮件的类
  • 在DataGrid里面根据日期的不同显示new图标
  • C#条形码
     
    [作者:不详    转贴自:不详    点击数:    更新时间:2006-4-6 16:03:27]

    #region c#条形码
            public string bar_code(object str, int ch, int cw, int type_code)
            {
                string strTmp=str.ToString();
                string code=strTmp;
                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.Replace("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=strTmp.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", "_|__|_||_|_||");
                strTmp=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("_", "<span style='height:"+height+";width:"+width+";background:#FFFFFF;'></span>");
                strTmp=strTmp.Replace("|", "<span style='height:"+height+";width:"+width+";background:#000000;'></span>");
                if(type_code==1)
                {
                    return strTmp+"<BR>"+code;
                }
                else
                {
                    return strTmp;
                }
            }
            #endregion
    首页 | 1 | 尾页  共 1 页
     
    winner 打印本页 关闭窗口

         文 章 评 论
    评论人 查看该文章的评论 发表时间
       笔 名* : 0 50分 60分 70分 80分 90分 100分
    评论内容 *: (最多1000字。当前字数:0)


    没有相关评论,欢迎您参与!

    - 关于本站 - 网站帮助 - 下载声明 - 友情连接 - 网站地图 -
    Copyright © 2005-2006 myTopWin.Com. All Rights Reserved . [桂ICP备06004496号]