如何把一个FORM中的部分区域COPY下来,保存成一图片? 如题。多谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 [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 Bitmap memoryImage;private void CaptureScreen(){ Graphics mygraphics = this.CreateGraphics(); Size s = this.Size; 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.ClientRectangle.Width, this.ClientRectangle.Height, dc1, 0, 0, 13369376); mygraphics.ReleaseHdc(dc1); memoryGraphics.ReleaseHdc(dc2);} GDI+ 编程:确定鼠标选择的位置,不过需要调用api,不太记得了,好久没做gdi+了 已知一存储路径例如:E:\C#2005\shiyan6\App.exe 怎样截取字符串 错误求助:在connectionstring中未指定oledb提供程序。示例为:"provider=sqloledb;". 如何让下拉列表框的第一个项目为选中状态 WIN FROM中DATAGRID怎么得到用户用鼠标双击单元格的事件 xmlhttp的问题 如何通过网页调用remoting? Excel中怎么插入一行(急) 新手求助sql05中的某列导出到checklistbox 关于串行通讯的一系列问题 求好的建议或者是解决方案 简单问题:Regex匹配中文字符时如何实现类似原子零宽度断言的功能?
public static extern long BitBlt (IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, int dwRop);
private Bitmap memoryImage;
private void CaptureScreen()
{
Graphics mygraphics = this.CreateGraphics();
Size s = this.Size;
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.ClientRectangle.Width, this.ClientRectangle.Height, dc1, 0, 0, 13369376);
mygraphics.ReleaseHdc(dc1);
memoryGraphics.ReleaseHdc(dc2);
}