excel 转换为 img图片(在线等待...)。 请教高手,如何将excel文件转换为img,有什么方案?有代码请附上,谢谢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在一个panel里放个DataGridView,Excel里的东西读到这个DataGridView里,然后把这个Panel里的东西保存成图片 #region 抓屏成图片 [System.Runtime.InteropServices.DllImport("gdi32.dll ")] public static extern long BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, int dwRop); private Image memoryImage; private void CaptureScreen() { Graphics mygraphics = this.panel_Print.CreateGraphics();//创建的是整个panel Size s = this.panel_Print.Size;//取panel大小 memoryImage = new Bitmap(s.Width, s.Height, mygraphics); Graphics memoryGraphics = Graphics.FromImage(memoryImage); IntPtr dc1 = mygraphics.GetHdc(); IntPtr dc2 = memoryGraphics.GetHdc(); BitBlt(dc2, 0, 0, this.panel_Print.ClientRectangle.Width, this.panel_Print.ClientRectangle.Height, dc1, 0, 0, 13369376); mygraphics.ReleaseHdc(dc1); memoryGraphics.ReleaseHdc(dc2); } #endregion 后置类不执行问题`~~~~ 我的vs2008智能提示显示异常,而且智能提示是英文的。 关于SplitContainer中建立子窗体的 修改了DataSet后,如何提交到数据库? 请问A4,在PageSize里面怎么表示??? vb转c#的困惑 谁能提供visual studio tools for office的下载地址?? 如何正确使用"更新"存储过程 请教大家一个 WinForm 的开发模式: 怎么样看到.net 类库的源代码?? 【100分求解】图片移动起来闪呀闪呀闪。。。。 SL+WCF+basicHttpBinding传递byte[]大小限制的問題,求解?
[System.Runtime.InteropServices.DllImport("gdi32.dll ")]
public static extern long BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, int dwRop);
private Image memoryImage;
private void CaptureScreen()
{
Graphics mygraphics = this.panel_Print.CreateGraphics();//创建的是整个panel
Size s = this.panel_Print.Size;//取panel大小
memoryImage = new Bitmap(s.Width, s.Height, mygraphics);
Graphics memoryGraphics = Graphics.FromImage(memoryImage);
IntPtr dc1 = mygraphics.GetHdc();
IntPtr dc2 = memoryGraphics.GetHdc();
BitBlt(dc2, 0, 0, this.panel_Print.ClientRectangle.Width, this.panel_Print.ClientRectangle.Height, dc1, 0, 0, 13369376);
mygraphics.ReleaseHdc(dc1);
memoryGraphics.ReleaseHdc(dc2);
}
#endregion