public Bitmap im = new Bitmap("图片1.JPG");//图片的大小 320x384我已经将窗体的背景设置为“白色”,同时
也将窗体的TransparencyKey也设置为“白色”了。
也将窗体的TransparencyKey也设置为“白色”了。
解决方案 »
- C# winform程序中怎样实现tabcontrol控件中的tabpage动态的隔一段时间轮换一页
- WMI查询多实例进程的CPU占用率问题
- 不打开outlook获得未读邮件的数量 C#程序
- 急!!!NHibernate 映射实体类
- 关于SendMessage
- vs2005在WEB上怎么做框架集?
- 在WINFORM程序中,如何,在文本框中每输入一个字符就触发一个事件???
- datarow插入的问题
- 一个奇怪的线程问题
- ~~~~~~~~DataTable自增长列,很奇怪的问题!~~~~~~~~
- 还是关于c#中使用dropdownlist的问题,高分求大家讨论
- byte型的数据怎么按位取反?取反后的数据也要为byte型
im.MakeTransparent(Color.White);
感激不仅... ...
[email protected]
GraphicsPath myPath = new GraphicsPath();
中的myPath 变量没有实例化。
那么自然没有将myPath定义好的曲线以外的
区域给排除在外,那么重写的效果肯定还是原来的
那样了。=============================================
现在有谁能给小弟写几句代码,这100分就给他好了:
GraphicsPath myPath = new GraphicsPath();
//将变量按照这样参数实例化
//myPath = new GraphicsPath(/*points,types,fillMode*/); 拜托!
急急。
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
try
{
Graphics gr = e.Graphics;
Bitmap img = new Bitmap("test.bmp"); //要把test.bmp放在debug目录下
img.MakeTransparent(Color.Black);
gr.DrawImage(img,0,0,this.Width,this.Height);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
这样,你就会得到你要的效果了,你可以试试,有问题再问吧。