C# 位图到Picturebox

C# 位图到Picturebox,c#,bitmap,C#,Bitmap,这个问题涉及到。最后,用户执行如下操作 Bitmap bmp = (Bitmap)Bitmap.FromStream(new MemoryStream(buffer,0,total)); 现在,我想在PictureBox中显示此图像。那么,在这个地方应该是什么呢???下面 pictureBox1.Image = ??? pictureBox1.Image=bmp bmp就是图像(Bitmapinherits fromimage),所以你不需要做任何特殊的事情。试试pictureBox1.im

这个问题涉及到。最后,用户执行如下操作

Bitmap bmp = (Bitmap)Bitmap.FromStream(new MemoryStream(buffer,0,total));
现在,我想在PictureBox中显示此图像。那么,在这个地方应该是什么呢???下面

pictureBox1.Image = ???

pictureBox1.Image=bmp


bmp就是图像(
Bitmap
inherits from
image
),所以你不需要做任何特殊的事情。

试试pictureBox1.image=bmp<代码>pictureBox1.Image=bmp
解决方案