C#截图的程序

xxbd123 2009-03-04 02:45:35
求C#截图的代码 要类似QQ的那种,可以选择, 不是整个截屏的那种 谢谢
...全文
3356 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
tzj112186 2011-04-20
  • 打赏
  • 举报
回复
非常 感谢19楼的
yangguangxiaozi 2011-03-29
  • 打赏
  • 举报
回复
private Bitmap getMainFormImage()
{
Screen scr = Screen.PrimaryScreen;
Bitmap img = new Bitmap(this.Width, this.Height);
Graphics g = Graphics.FromImage(img);
g.CopyFromScreen(new Point(this.Location.X, this.Location.Y), new Point(0, 0), new Size(this.Width, this.Height));
//IntPtr dc1 = g.GetHdc();
//g.ReleaseHdc(dc1);
img.Save("F:" + "\\"+"aa" +".png");
g.Dispose();
return img;
}
写程序的凯凯 2010-10-30
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 flurrying 的回复:]
http://download.csdn.net/source/1024018
下载去吧!
[/Quote]
打不开,系统显示找不到资源
chissie 2010-05-20
  • 打赏
  • 举报
回复

private void button3_Click(object sender, EventArgs e)
{
Bitmap myImage = new Bitmap(this.Width, this.Height);
Graphics g = Graphics.FromImage(myImage);
g.CopyFromScreen(new Point(this.Location.X, this.Location.Y), new Point(0, 0), new Size(this.Width, this.Height));
IntPtr dc1 = g.GetHdc();
g.ReleaseHdc(dc1);
myImage.Save(@"c:\screen1.jpg");
}

截取窗体屏幕,网上找的,没有试过,仅供LZ参考
huzling 2009-11-11
  • 打赏
  • 举报
回复
怎么抓指定窗口的图?
还有要是指定窗口被遮挡了一部分,还能抓到全部的图吗?
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 flurrying 的回复:]
http://download.csdn.net/source/1024018
下载去吧!
[/Quote]
怎么打不开啊!
birdlonger 2009-03-05
  • 打赏
  • 举报
回复
需要的话,可以传你份代码.
cppfaq 2009-03-04
  • 打赏
  • 举报
回复
[Quote=引用 14 楼 ZHOU550361299 的回复:]
哎呀。我 用那个代码进是出错啊,到底是怎么个弄的哦
[/Quote]
在Winform下用
ZHOU550361299 2009-03-04
  • 打赏
  • 举报
回复
哎呀。我 用那个代码进是出错啊,到底是怎么个弄的哦
春天的气息 2009-03-04
  • 打赏
  • 举报
回复
呵呵,上面的代码修改一下啦,就可以使用了。
自己动手,丰衣足食!


欢迎加入我的程序设计QQ群80532706哟
xxbd123 2009-03-04
  • 打赏
  • 举报
回复
SOS
xxbd123 2009-03-04
  • 打赏
  • 举报
回复
完全按照你给的代码 弄的
按下button没有任何反映....
zhaozhijun0207 2009-03-04
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 flurrying 的回复:]
http://download.csdn.net/source/1024018
下载去吧!
[/Quote]


也太狠了,居然要5个资源分.
  • 打赏
  • 举报
回复
学习ing 顶ing
iGouzy 2009-03-04
  • 打赏
  • 举报
回复
mark
zgke 2009-03-04
  • 打赏
  • 举报
回复
大概写了下...
你可以参考下..这个是刚写的
http://blog.csdn.net/zgke/archive/2009/03/04/3956936.aspx
jhdxhj 2009-03-04
  • 打赏
  • 举报
回复
做个记号哦
flurrying 2009-03-04
  • 打赏
  • 举报
回复
http://download.csdn.net/source/1024018
下载去吧!
ProjectDD 2009-03-04
  • 打赏
  • 举报
回复
UP
xxbd123 2009-03-04
  • 打赏
  • 举报
回复
加载更多回复(2)

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧