下载中心┊文章中心┊软件分类┊更新软件┊推荐下载┊热门软件┊更新文章┊热门文章
 
《拓文asp.net网站内容管理系统》官方演示站。
 设为首页    
 收藏本站
 作者:黄振安
 
网站首页 拓文CMS .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里面根据日期的不同...
  • 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  1篇/页  首页   上一页   下一页   尾页  合计 1 篇 Go:
     
    上一篇:各进制之间的转换
    下一篇:如何将枚举绑定到DropDownList上
    winner 打印本页 关闭窗口

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


    80 分阿梅不错的代码,收藏了2006-5-10 14:11:44

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