private void button2_Click(object sender, EventArgs e)
{
PictureBox p = new PictureBox();
Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("WindowsFormsApplication9.0410161.jpg"));
p.Image = bmp;
Point n = new Point(200,500);
p.Location = n;
}
为什么我这段代码不能成功显示bmp图片呢? 这样写对吗PictureBox p = new PictureBox()?
{
PictureBox p = new PictureBox();
Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("WindowsFormsApplication9.0410161.jpg"));
p.Image = bmp;
Point n = new Point(200,500);
p.Location = n;
}
为什么我这段代码不能成功显示bmp图片呢? 这样写对吗PictureBox p = new PictureBox()?
解决方案 »
- 关于webservice的想法,有点不太清楚
- 如题 HttpWebRequest抓取的内容为什么和IE上的源码不一样
- 如何做一个监控程序?
- 我的开发方案,请高手指点一下有什么问题和不足
- 急,上午就要解决,在线等~~~~~~~~解决马上结贴
- 一个简单的c#问题!!~~~~~~~~~~~~~
- 跪求C#图形移动程序
- 快来帮帮我???????????????????????????/!!!!!
- 什么是 策略文件,SerializableAttribute 是起什么作用的?什么是序列化
- 如何在C#中利用HTTP协议来上传文件,服务器有权限限制??
- 实体类怎么继承
- 能否用一个通用的方法很方便地将一个文本文件读入一个数组或List<>对象中。例如,
private void button2_Click(object sender, EventArgs e)
{
PictureBox p = new PictureBox();
Bitmap bmp = new Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("WindowsFormsApplication9.0410161.jpg"));
p.Image = bmp;
Point n = new Point(200,500);
p.Location = n;
this.Controls.Add(PictureBox );
}