导航:首页 > 编程语言 > qq截图代码实现

qq截图代码实现

发布时间:2023-01-29 16:09:35

『壹』 Win7旗舰版系统下使用qq截图功能实现快速截图的技巧

1、首先要打开并运行QQ程序,接着在键盘上按下crtl+alt+A组合快捷键自动调出QQ截图功能;
2、然后拖动鼠标,选择你需要截图的地方,选择好之后可以右键选择“完成”或者“保存”,或者直接点击截图下方的工具栏进行保存,完成的功能作用就是复制到剪贴板中,在需要的地方粘贴就可以,如果选择保存就是将其保存到电脑的路径中。
3、如果用户对截出来的图片不满意的话,可以鼠标右键退出截图,然后再重新截图就可以了。

『贰』 c#如何实现类似qq一样的截图功能

按快捷键后,先把整个屏幕截下来,然后显示在form1上,form1是一个没有边框的窗体,之后最大化显示form1,开始鼠标拖坐标,截取坐标内的图片,保存,

补充:
4年前用vb写的:

Option Explicit

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const theScreen = 0
Const theForm = 1

Private Sub Form_Load()
XPForm1.Make
Load Form2
End Sub

Private Sub Form_Unload(Cancel As Integer)
Unload Form2
Unload Me
End Sub

Private Sub HScroll1_Change()
If Picture1.Width > Picture2.Width Then
Picture1.Left = -((Picture1.Width - Picture2.Width) / 100) * HScroll1.Value
End If
End Sub

Private Sub MGButton1_Click()
If Option1.Value = True Then
If Check1.Value = 1 Then
Me.Hide
End If
Call Delay
Call keybd_event(vbKeySnapshot, theScreen, 0, 0)
Call Delay
Form2.Picture = Clipboard.GetData(vbCFBitmap)
Form2.Shape1.Height = 0
Form2.Shape1.Width = 0
Form2.Picture2.Visible = False
Form2.Picture3.Visible = False
Form2.Picture4.Visible = False
Form2.Show 1, Me
ElseIf Option2.Value = True Then
If Check1.Value = 1 Then
Me.Hide
End If
Call Delay
Call keybd_event(vbKeySnapshot, theScreen, 0, 0)
Call Delay
Picture1.Cls
Picture1.Picture = Clipboard.GetData(vbCFBitmap)
Me.Show
ElseIf Option3.Value = True Then
If Check1.Value = 1 Then
Me.Hide
End If
Call Delay
Call keybd_event(vbKeySnapshot, theForm, 0, 0)
Call Delay
Picture1.Cls
Picture1.Picture = Clipboard.GetData(vbCFBitmap)
Me.Show
Else
End If
End Sub

Private Sub Delay()
Dim i As Integer
For i = 0 To 1000
DoEvents
Next i
End Sub

Private Sub MGButton2_Click()
Picture1.Cls
Picture1.Picture = LoadPicture
End Sub

Private Sub MGButton3_Click()
CommonDialog1.DialogTitle = "保存"
CommonDialog1.FileName = ""
CommonDialog1.Filter = "位图文件(*.BMP)|*.bmp|所有文件(*.*)|*.*"
CommonDialog1.FilterIndex = 0
CommonDialog1.ShowSave

If CommonDialog1.FileName <> "" Then
SavePicture Picture1.Image, CommonDialog1.FileName
End If
End Sub

Private Sub MGButton4_Click()
Clipboard.SetData Picture1.Image, vbCFBitmap
End Sub

Private Sub VScroll1_Change()
If Picture1.Height > Picture2.Height Then
Picture1.Top = -((Picture1.Height - Picture2.Height) / 100) * VScroll1.Value
End If
End Sub

『叁』 本人是用C#做了一个QQ程序...如果做一个截图功能

比较长的代码···
思路也比较明显,你可以看看

using System;
using System.Drawing;
using System.Windows.Forms;

namespace Teboscreen
{

public partial class Form1 : Form
{
#region:::::::::::::::::::::::::::::::::::::::::::Form level declarations:::::::::::::::::::::::::::::::::::::::::::
public bool LeftButtonDown = false;
string ScreenPath;

public Point ClickPoint = new Point();
public Point ReleasePoint = new Point();
public Point LastPoint = new Point();
public Point CurrentPoint = new Point();

Graphics g;
Pen MyPen = new Pen(Color.Blue, 1);
Pen EraserPen = new Pen(Color.FromArgb(255, 255, 192), 1);

private Form m_InstanceRef = null;
public Form InstanceRef
{
get
{
return m_InstanceRef;
}
set
{
m_InstanceRef = value;
}
}

#endregion

#region:::::::::::::::::::::::::::::::::::::::::::Mouse Event Handlers & Drawing Initialization:::::::::::::::::::::::::::::::::::::::::::
public Form1()
{

InitializeComponent();
this.MouseDown += new MouseEventHandler(mouse_Click);
this.MouseUp += new MouseEventHandler(mouse_Up);
this.MouseMove += new MouseEventHandler(mouse_Move);
MyPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
g = this.CreateGraphics();

}
#endregion

#region:::::::::::::::::::::::::::::::::::::::::::Exit Button:::::::::::::::::::::::::::::::::::::::::::
private void button1_Click(object sender, EventArgs e)
{
Close();
}
#endregion
#region:::::::::::::::::::::::::::::::::::::::::::Mouse Buttons:::::::::::::::::::::::::::::::::::::::::::
private void mouse_Click(object sender, MouseEventArgs e)
{
g.Clear(Color.FromArgb(255, 255, 192));
LeftButtonDown = true;
ClickPoint = new Point(System.Windows.Forms.Control.MousePosition.X, System.Windows.Forms.Control.MousePosition.Y);
}

private void mouse_Up(object sender, MouseEventArgs e)
{
LeftButtonDown = false;
ReleasePoint = new Point(System.Windows.Forms.Control.MousePosition.X, System.Windows.Forms.Control.MousePosition.Y);
saveFileDialog1.DefaultExt = "bmp";
saveFileDialog1.Filter = "bmp files (*.bmp)|*.bmp";
saveFileDialog1.Title = "Save screenshot to...";
saveFileDialog1.ShowDialog();
ScreenPath = saveFileDialog1.FileName;

if ("" != ScreenPath)
{
SaveScreen();
}

this.Hide();
ControlPanel controlpanel = new ControlPanel();
controlpanel.InstanceRef = this;
controlpanel.Show();

}
#endregion

#region:::::::::::::::::::::::::::::::::::::::::::Drawing the rectangular selection window:::::::::::::::::::::::::::::::::::::::::::
private void mouse_Move(object sender, MouseEventArgs e)
{

//Resize (actually delete then re-draw) the rectangle if the left mouse button is held down
if (LeftButtonDown)
{

//Erase the previous rectangle
g.DrawRectangle(EraserPen, ClickPoint.X, ClickPoint.Y, LastPoint.X - ClickPoint.X, LastPoint.Y - ClickPoint.Y);

//Save the current location of the cursor for erasing the rectangle on next move
LastPoint = new Point(Cursor.Position.X, Cursor.Position.Y);

//Draw a new rectangle
g.DrawRectangle(MyPen, ClickPoint.X, ClickPoint.Y, Cursor.Position.X - ClickPoint.X, Cursor.Position.Y - ClickPoint.Y);
//Save the current cursor position, in case the button is released, for ScreenShot.CaptureImage
CurrentPoint = new Point(Cursor.Position.X, Cursor.Position.Y);

}

}
#endregion

#region:::::::::::::::::::::::::::::::::::::::::::SaveScreen:::::::::::::::::::::::::::::::::::::::::::
private void SaveScreen()
{

Point StartPoint = new Point(ClickPoint.X, ClickPoint.Y);
Rectangle bounds = new Rectangle(ClickPoint.X, ClickPoint.Y, CurrentPoint.X - ClickPoint.X, CurrentPoint.Y - ClickPoint.Y);
ScreenShot.CaptureImage(StartPoint, Point.Empty, bounds, ScreenPath);

}
#endregion

}
}

这个是ControlPanel代码
using System;
using System.Drawing;
using System.Windows.Forms;

namespace Teboscreen
{

public partial class ControlPanel : Form
{

string ScreenPath;

private Form m_InstanceRef = null;
public Form InstanceRef
{
get
{
return m_InstanceRef;
}
set
{
m_InstanceRef = value;
}
}

public ControlPanel()
{
InitializeComponent();
}

private void bttCaptureArea_Click(object sender, EventArgs e)
{
this.Hide();
Form1 form1 = new Form1();
form1.InstanceRef = this;
form1.Show();
}

private void bttExit_Click(object sender, EventArgs e)
{
Application.Exit();
}

private void bttCaptureScreen_Click(object sender, EventArgs e)
{

saveFileDialog1.DefaultExt = "bmp";
saveFileDialog1.Filter = "bmp files (*.bmp)|*.bmp";
saveFileDialog1.Title = "Save screenshot to...";
saveFileDialog1.ShowDialog();
ScreenPath = saveFileDialog1.FileName;

//Conceal this form while the screen capture takes place
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.TopMost = false;

//Allow 250 milliseconds for the screen to repaint itself (we don't want to include this form in the capture)
System.Threading.Thread.Sleep(250);

Rectangle bounds = Screen.GetBounds(Screen.GetBounds(Point.Empty));
ScreenShot.CaptureImage(Point.Empty, Point.Empty, bounds, ScreenPath);

//The screen has been captured and saved to a file so bring this form back into the foreground
this.WindowState = System.Windows.Forms.FormWindowState.Normal;
this.TopMost = true;

}

}
}

ScreenShot代码
using System;
using System.Drawing;
using System.Drawing.Imaging;

namespace Teboscreen
{
class ScreenShot
{
public static void CaptureImage(Point SourcePoint, Point DestinationPoint, Rectangle SelectionRectangle, string FilePath)
{
using (Bitmap bitmap = new Bitmap(SelectionRectangle.Width, SelectionRectangle.Height))
{
using (Graphics g = Graphics.FromImage(bitmap))
{
g.CopyFromScreen(SourcePoint, DestinationPoint, SelectionRectangle.Size);
}
bitmap.Save(FilePath, ImageFormat.Bmp);
}
}
}
}

『肆』 哪里有java写的类似QQ截图工具的源代码

不能立即给你提供源码 但是可以教给你怎么实现。
首先 你要截屏 肯定专要在属于用鼠标圈定属一个区域来截取这个区域。

你可以这样:
先截取当前屏幕的满屏图片:new robot().createScreenCapture(r) 这个是截屏代码 r是Rectangle类型 代表要截取的区域。

然后用 JDialog 做一个无控制条的窗口,大小设置成满屏,把截取的这个满屏的图片贴到这个 JDiaglog 里

然后做一下鼠标圈定区域,这个很简单 不详细说了, 最后对你圈定的这个区域再做一次截屏,这个不就是你要的截图了。,。 最后别忘了 截屏完毕后 关闭JDialog

你要是觉得这样做麻烦,也没别的办法。 反正我很明白 QQ的截屏也是这样做的

『伍』 像QQ的截图功能 随意截屏这种功能 是用什么语言写的啊javac

1、截图是把电脑上所显示的部分截取下来形成图片。下载图片是把网页上的图片保存版到本机。2、电脑截图最简权单的就是按PrtScr(printScreen)键,一般在方向键上面的那个键盘区的左上角。然后在电脑的程序、附件、画图软件中粘贴就可以保存下来。当然也可以粘贴到其他软件中。比如photoshop、word、 等等。3、 截图可以在聊天过程中选择聊天窗口下面的一个小显示器加小剪刀图标,然后拖动鼠标出现小框选择要截取的屏幕部分。之后双击鼠标就可以把要截取的部分粘贴到聊天窗口里。还有一种方法是 软件开着,但是不管有没有聊天窗口可以按CTRL+ALT+A键,同样可以截取,截取之后的内容想用的时候在任何可以粘贴的软件中按粘贴即可。或者按快捷键CTRL+V也可以实现粘贴。两种方法在想取消截屏时按鼠标右键都可以取消。4、如果只要一小部分就可以用 来截取,方法上面说过了。或者只要一个软件或网页的窗口可以按ALT+PrtScr键就可以只截取软件窗口了。

『陆』 qq截图怎么操作

以电脑为例,qq截图的操作步骤是:
1、进入到QQ页面,在消息下方,找到要截图的好友的聊天页面,在聊天界面里,点击功能栏中的【小剪刀】图标。
2、最后按住鼠标左键,移动鼠标,拖选好要截图的位置,托选好之后,松开鼠标,点击【完成】命令即可。
QQ空间是目前中国最大的互联网综合服务提供商之一,也是中国服务用户最多的互联网企业之一。成立10多年以来,腾讯一直秉承“一切以用户价值为依归”的经营理念,始终处于稳健发展的状态。2004年6月16日,在QQ空间上可以书写日志、写说说、上传用户个人的图片、听音乐等功能。除此之外,用户还可以根据个人的喜爱设定空间的背景、小挂件等,从而使空间有自己的特色。
截至2016年底,QQ空间月活跃账户数达到6.52亿、QQ空间智能终端月活跃账户数达到5.96亿。腾讯QQ空间已禁止使用自定义代码(QQ空间模块,QQ空间留言代码除外),具体禁止日期无从考证,开通日期亦无预期。所有网络上流传的(QQ空间模块,QQ空间留言代码除外)都已过期。

『柒』 asp.net 如何实现把qq截图粘贴的textbox中

不现实也不能实现的(当然在未来HTML6、7。。。的版本中可能会实现)。
如果是WinForm程序的话是可以实现的。
因为QQ截图是保存在系统的截切板中的,而ASP.NET所生成的最终将会是一个HTML页面。
而HTML页面里面只能运行js代码(插入flash、silverlight、activeX等其他插件不算)。
又因为js是运行在浏览器端的,所以有安全限制,故意让js代码没权限访问到截切板的。
所以,js不能访问到剪切板,故而不能实现你所说的需求。

『捌』 QQ截图的灰屏效果。要用C#语言实现,那位高手会啊,要代码哦。

造一个没有任何菜单框的无边框的空白的窗体,并且一开始就最大化,不透明度为30%(这个可以自己调,不透明度越高,就越难透过后面的东西,颜色就越深。) ,背景色为黑色的窗体(ControlBox=false Text=

『玖』 vb模拟QQ 截图

下面的代码是我很欣赏的编程牛人CBM666的,你看下就应该能明白意思了,需要的haunted自己修改一下,我运行过了可以运行成功,不会截到其它窗体只是打印当前窗体
友情提示:你点下打印键的时候没有提示会直接打印出窗口内容来,没有确定取消的按钮的,当初我在公司试的时候随便贴了个很烂的图就给打出来了,还被人笑了。。。

'添加 Picture1 Picture2 各别放一张图片 窗体也可加图片, 只是测试用罢了.
,Text1 随便打一些内容,(只是测试用)
'再随便加一个Picture3 用来保存图片
'Command1 抓图存图 Command2 打印

'本代码是将窗体内所有的控件与窗体一起保存到Picture3再打印出来.

Option Explicit
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const theScreen = 0 '整个Screen
Const theForm = 1 '当前活动界面
Private Sub Form_Load()
Command1.Caption = "抓取窗体"
Command2.Caption = "打 印"
Picture3.Move Screen.Width
Picture3.AutoRedraw = True
Picture3.BorderStyle = 0
Me.AutoRedraw = False
Clipboard.Clear
End Sub

Private Sub Command1_Click()
Me.Refresh
Picture3.Picture = LoadPicture()
Picture3.Width = Me.Width
Picture3.Height = Me.Height
Call keybd_event(vbKeySnapshot, 1, 0, 0)
DoEvents
Picture3.Picture = Clipboard.GetData(vbCFBitmap)
Set Picture3.Picture = Picture3.Image '此时才真正显示Picture
'SavePicture Picture3.Image, "c:\kkkw.bmp"
End Sub

Private Sub Command2_Click()
Printer.PaintPicture Picture3.Picture, 0, 0, Picture3.Width, Picture3.Height
Printer.EndDoc
End Sub

有空你搜索下CBM666的代码,绝对能给你很大收获

阅读全文

与qq截图代码实现相关的资料

热点内容
桌面文件没有备份怎么恢复 浏览:207
主角在金三角贩卖军火的小说 浏览:587
疫情时期病例数据从哪里来 浏览:774
重生之红色军工铁血 浏览:86
男主姓皇甫领养女主 浏览:267
数控编程系统回参怎么操作 浏览:946
内地 战争影片3个字 浏览:107
国内最大的视频网站是什么 浏览:756
安徽联通刷钻代码 浏览:952
离我最近的电影院在哪 浏览:627
123.eecom 浏览:506
一部国外电影一个老头爱上一个老太 浏览:704
中云文化大数据秦龙 浏览:444
俄罗斯电影《沙漠》2021 浏览:656
中兴u930升级包 浏览:159
剧情介绍有哪些APP 浏览:528
搞笑的恋爱电影在线观看 浏览:804
十大封禁爱情电影美国 浏览:90
gl小说百度网盘txt下载 浏览:925
格瑞斯甲亢看哪些数据 浏览:587

友情链接