仿qq截图源码
① 关于C#的 模仿QQ截图
哈哈。网上有的你搜索一下,但是好象不怎么好用
② 谁有仿qq聊天之类的app源码,最好是java写的,有即时聊天,语音聊天,图片发送之类的功能就好
我这有这个的可执行代码以及源码,但没有截图功能。你拿去参考一下,希望对你有帮助。
③ 哪里有JAVA写的类似QQ截图工具的源代码
不能立即给你提供源码 但是可以教给你怎么实现。
首先 你要截屏 肯定要在属于用鼠标圈定一个区域来截取这个区域。
你可以这样:
先截取当前屏幕的满屏图片:new robot().createScreenCapture(r) 这个是截屏代码 r是Rectangle类型 代表要截取的区域。
然后用 JDialog 做一个无控制条的窗口,大小设置成满屏,把截取的这个满屏的图片贴到这个 JDiaglog 里
然后做一下鼠标圈定区域,这个很简单 不详细说了, 最后对你圈定的这个区域再做一次截屏,这个不就是你要的截图了。,。 最后别忘了 截屏完毕后 关闭JDialog
你要是觉得这样做麻烦,也没别的办法。 反正我很明白 QQ的截屏也是这样做的
④ vb求截取区域屏幕图并保存为文件```的代码
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC _
Lib "user32" (ByVal hwnd As Long, _
ByVal hdc As Long) As Long
Private Declare Function BitBlt _
Lib "gdi32" (ByVal hDestDC As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long
Private Declare Function StretchBlt _
Lib "gdi32" (ByVal hdc As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal nSrcWidth As Long, _
ByVal nSrcHeight As Long, _
ByVal dwRop As Long) As Long
'首先,在窗体上添加个图片框PictureBox控件Name为Picture1
'截取指定位置指定大小的区域,保存到c:\1.bmp文件
Private Sub Form_Load()
Dim hDCtmp As Long
Dim w, h, X, Y
w = 300 ' 要截取屏幕部分的宽度
h = 300 ' 要截取屏幕部分的高度
X = 300 ' 横坐标 / 左边界 Left
Y = 300 ' 纵坐标 / 上边界 Top
Me.Hide
hDCtmp = GetDC(0)
Picture1.BorderStyle = 0
Picture1.AutoRedraw = True
Picture1.Width = w * Screen.TwipsPerPixelX
Picture1.Height = h * Screen.TwipsPerPixelY
Call BitBlt(Picture1.hdc, 0, 0, w, h, hDCtmp, X, Y, vbSrcCopy)
ReleaseDC 0, hDCtmp
SavePicture Picture1.Image, "c:\1.bmp"
Me.Show
End Sub
⑤ 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
⑥ javascript实现qq屏幕截图源代码
这个一般是不行的,IE需要配合activeX,chrome需要配合插件,单纯的JS不行....
⑦ python怎么实现截图.类似QQ一样的
fromPILimportImageGrab
im=ImageGrab.grab()
#可以指定要截取图片的坐标位置,不带参数默认全屏截图
im.save(addr,'jpeg')
#第一个参数是保存路径,第二个参数是图片格式
需要先下载一个PIL图形库