在桌面应用程序中 你直接加载图片会好点   
要是在网站上  这个需要一些步骤  
要新建一个页面  在load里调用验证码
之后把这个页面加载你要用的<IMG url =“”>里

解决方案 »

  1.   

    我在页面上调用验证码显示不了<IMG src="CheckCode.aspx">
    问题出在Line 95: Font font = new System.Drawing.Font("Arial", 12, (System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic));
    提示:Exception Details: System.ArgumentException: Font '?' cannot be found.
    应该是字体引用不了的意思。
      

  2.   

    System.Drawing.Font font = new System.Drawing.Font("楷体_GB2312", 16, (System.Drawing.FontStyle.Bold));
    检查其他字体
      

  3.   

    国外的主机,系统自带的Arial字体都没有,换其它字体都一样的报错。
    会不会是我没有读取字体目录的权限呢?
      

  4.   

    public class Font
    要重新定义Font吗?