Bitmap bt=new Bitmap(stream),使用了无效的参数,why? 在Northwind数据库里的Employees里的photo,就会包错,但是对于pub数据库里的pub_info里的logo就不会包错. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 stream是ystem.IO.MemoryStream.好象和社么"有题头的图象"有关,大家帮帮忙 System.IO.MemoryStream stream = new System.IO.MemoryStream();System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream);int BufferSize = 1024;byte[] Buffer = new Byte[BufferSize];long Offset = 0;long BytesRead = 0;do {BytesRead = dr.GetBytes(0, Offset, Buffer, 0, BufferSize);writer.Write(Buffer, 0, (int)BytesRead);Offset += BytesRead;} while (BytesRead == BufferSize);pictureBox1.Image=new Bitmap(stream); 改为pictureBox1.Image=Image.FromStream(stream);试试 求导入导出原程序 在.net中如何把server数据库内容,显示成网页格式? 请教有关 线程 和 FTP 的问题 关于映射问题 请教:多级联动combobox怎么弄,谢谢! 如何获取操作时快捷键? 有谁用过DevExpressNETWindowsFormsSuite这一套控件,我这里用为什么这么慢呢? 请教一个c#问题: 会C++的函数指针,不会C#的委托 LogRecord,Clerk,Com+,Transaction的问题?大给分啊.少了再给~~我还有1400多分.全给~ 树状编制如何显示 谁可以给我讲讲名称空间
好象和社么"有题头的图象"有关,大家帮帮忙
System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream);
int BufferSize = 1024;
byte[] Buffer = new Byte[BufferSize];
long Offset = 0;
long BytesRead = 0;
do
{
BytesRead = dr.GetBytes(0, Offset, Buffer, 0, BufferSize);
writer.Write(Buffer, 0, (int)BytesRead);
Offset += BytesRead;
} while (BytesRead == BufferSize);pictureBox1.Image=new Bitmap(stream);
pictureBox1.Image=Image.FromStream(stream);试试