标题:遇到一个LinearGradientBrush的问题,不包含采用“5”参数的构造函数!!
取消只看楼主
lpkcisco
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2011-9-29
结帖率:0
 问题点数:0 回复次数:0 
遇到一个LinearGradientBrush的问题,不包含采用“5”参数的构造函数!!
代码是
  Font font = new Font("Arial", 20, (FontStyle.Bold));
           Rectangle rt = new Rectangle(0, 0, image.Width, image.Height);
           System.Windows.Media.LinearGradientBrush brush = new System.Windows.Media.LinearGradientBrush(rt, Color.Blue, Color.DarkRed, 3, true);
           g.DrawString(strValidCode, font, brush, 5, 2);
           g.DrawRectangle(new Pen(Color.Silver), 0, 0, image.Width - 1, image.Height - 1);
            ms = new ();
           image.Save(ms, ImageFormat.Gif);
           context.Response.ClearContent();
           context.Response.ContentType = "image/gif";
           context.Response.BinaryWrite(ms.ToArray);
报错误    1    “System.Windows.Media.LinearGradientBrush”不包含采用“5”参数的构造函数     

谢谢了!急等!!代码是
  Font font = new Font("Arial", 20, (FontStyle.Bold));
           Rectangle rt = new Rectangle(0, 0, image.Width, image.Height);
           System.Windows.Media.LinearGradientBrush brush = new System.Windows.Media.LinearGradientBrush(rt, Color.Blue, Color.DarkRed, 3, true);
           g.DrawString(strValidCode, font, brush, 5, 2);
           g.DrawRectangle(new Pen(Color.Silver), 0, 0, image.Width - 1, image.Height - 1);
            ms = new ();
           image.Save(ms, ImageFormat.Gif);
           context.Response.ClearContent();
           context.Response.ContentType = "image/gif";
           context.Response.BinaryWrite(ms.ToArray);
报错误    1    “System.Windows.Media.LinearGradientBrush”不包含采用“5”参数的构造函数     

谢谢了!急等!!
2011-10-23 17:14



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-353230-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.164747 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved