截图软件编写,截图软件编写为什么不成功

截图软件编写,截图软件编写为什么不成功缩略图

易语言编写QQ截图软件

易语言编写QQ截图软件

我有这样的模块 我发去网盘你去下载吧 http://d.namipan.com/d/b8d50a9d41c9c8740a1b428bf6d2f57452d915a9caf40100 和QQ的绝对一样哈

想用易语言编写一个截图软件?

想用易语言编写一个截图软件?

画板或快照 精易论坛有相关源码 希望微凉清风的回答能帮助到您,谢谢! —————————精易论坛 – 问问团队————————— 此答案来源于 → 精易论坛,要学习编程的可百度一下"精易论坛" 我们的口号是:帮助别人等于帮助自己

如何用python编写一个截屏软件

如何用python编写一个截屏软件

Python是一种即译式的,互动的,…或新建一个界面让数据在互不兼容的系统中流动….Zope是一个开放源代码的Web应用服务器,采用Python语言开发,使用它您可

易语言傻瓜式一键截图工具怎么写

楼主看看这篇教程把,教你如何利用易语言打造截图工具.http://jingyan.baidu.com/article/3ea51489e0e9b852e61bba07.html

利用python编写一个类似QQ截图的小工具应该怎么入手

#保存下面代码为 “微信截图.pyw”,并把微信安装文件夹的 PrScrn.dll 文件拷贝到同一目录下

#!/usr/bin/env python

#-*- coding:utf-8 -*-

import ctypes

import os

def capture():

try:

dll = ctypes.cdll.LoadLibrary(‘PrScrn.dll’)

except Exception:

print(“Dll load error!”)

return

else:

try:

dll.PrScrn(0)

except Exception:

print(“Sth wrong in capture!”)

return

def main():

os.system(“pause”)

capture()

if __name__ == “__main__”:

main()

如何实现快捷键截图:

1. 将上述代码保存为*.pyw格式

2. 右键点击发送到桌面快捷方式

3. 右键点击桌面上该文件的快捷方式 “属性” –> “快捷方式”,点击 “快捷键”,接着按下 “Ctrl + 你想设置的按键”

4. 保存就好了

怎么用易语言写截图软件?

调用格式: 〈字节集〉 快照 ([整数型 窗口句柄],[整数型 输出宽度],[整数型 输出高度]) – 系统核心支持库->系统处理

英文名称:GetWinPic

捕获指定窗口或屏幕上所有现有显示内容,返回相应图片数据。如果失败,返回空字节集。本命令为高级命令。

参数<1>的名称为“窗口句柄”,类型为“整数型(int)”,可以被省略。指定欲捕获其显示内容的窗口。如果被省略,默认为捕获屏幕显示内容。

参数<2>的名称为“输出宽度”,类型为“整数型(int)”,可以被省略。指定图片的输出宽度。如果小于0,参数值指定的是最终图片输出宽度相对于所取得图片宽度的百分比(最小为10%);如果等于0,则按图片原宽度输出;如果大于0,指定输出图片的绝对宽度。如果本参数被省略,默认值为0。

参数<3>的名称为“输出高度”,类型为“整数型(int)”,可以被省略。指定图片的输出高度。如果小于0,参数值指定的是最终图片输出高度相对于所取得图片高度的百分比(最小为10%);如果等于0,则按图片原高度输出;如果大于0,指定输出图片的绝对高度。如果本参数被省略,默认值为0。

操作系统需求: Windows

怎么用易语言制作截图工具

变量=快照() 写到文件() 注释定义一个局部变量 这两个命令然后根据提示写下括号里的参数就好了

按键精灵按顺序截图脚本

如果就仅有这一张,或者这么几张,随便用一个作图软件即可.如果是几十张或者更多,那用按键精灵才有意义 方法如下:按键精灵论坛上有 沉8 的 TOOLS 插件,可以截图BMP格式的1:确定大体的坐标,因为从图上看,参差不齐,坐标不是有规律的,需要先确定大体的坐标2:每张图的周边都是白色空隙,这就是确定这个图修正的坐标值判断的边缘,用查色方式可以确定3:截图

请问怎么写一个vb区域截图的软件?可能用 BitBlt来写,但是我只会写截全屏的。真的很急。。。

hDCtmp = GetDC(0)

BitBlt Me.hdc, -Me.Left / 15, -Me.Top / 15, Me.Width, Me.Height, hDCtmp, a, b, vbSrcCopy

ReleaseDC 0, hDCtmp

看见了没,这个是使用窗体的位置进行截图。窗体的刻度单位是像素,如果是提就把宽和高除以15.

下面是我编的截图程序,比qq差点吧,今天完善了一些,勉强可以用,你看不看的懂就不清楚了。

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

Dim xx As Integer, yy As Integer, xx1 As Integer, yy1 As Integer, z As Integer

Private Sub Form_Load()

Line1.Visible = False

Line2.Visible = False

Line3.Visible = False

Line4.Visible = False

Label1.Visible = False

Label2.Visible = False

Me.Move 0, 0, Screen.Width, Screen.Height

hDCtmp = GetDC(0)

BitBlt Me.hdc, 0, 0, Me.Width, Me.Height, hDCtmp, a, b, vbSrcCopy

ReleaseDC 0, hDCtmp

End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then

xx = X

yy = Y

Line1.Visible = True

Line2.Visible = True

Line3.Visible = True

Line4.Visible = True

Label1.Visible = True

Label2.Visible = False

End If

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then

xx1 = X

yy1 = Y

Line1.X1 = xx: Line1.Y1 = yy: Line1.X2 = xx: Line1.Y2 = yy1

Line2.X1 = xx: Line2.Y1 = yy: Line2.X2 = xx1: Line2.Y2 = yy

Line3.X1 = xx1: Line3.Y1 = yy: Line3.X2 = xx1: Line3.Y2 = yy1

Line4.X1 = xx: Line4.Y1 = yy1: Line4.X2 = xx1: Line4.Y2 = yy1

If xx < xx1 And yy < yy1 Then

Label1.Move xx1, yy1

Label1.Caption = “当前大小” & (xx1 – xx) & “*” & (yy1 – yy) & vbCrLf & “当前RGB(” & _

Abs((ColorCmp And &HFF&) – (Me.Point(xx1, yy1) And &HFF&)) & “,” & _

Abs((ColorCmp And &HFF00&) – (Me.Point(xx1, yy1) And &HFF00&)) / &H100& & “,” & _

Abs((ColorCmp And &HFF0000) – (Me.Point(xx1, yy1) And &HFF0000)) / &H10000 & “)”

ElseIf xx > xx1 And yy < yy1 Then

Label1.Move xx, yy1

Label1.Caption = “当前大小” & (xx1 – xx) & “*” & (yy1 – yy) & vbCrLf & “当前RGB(” & _

Abs((ColorCmp And &HFF&) – (Me.Point(xx1, yy1) And &HFF&)) & “,” & _

Abs((ColorCmp And &HFF00&) – (Me.Point(xx1, yy1) And &HFF00&)) / &H100& & “,” & _

Abs((ColorCmp And &HFF0000) – (Me.Point(xx1, yy1) And &HFF0000)) / &H10000 & “)”

ElseIf xx < xx1 And yy > yy1 Then

Label1.Move xx1, yy

Label1.Caption = “当前大小” & (xx1 – xx) & “*” & (yy1 – yy) & vbCrLf & “当前RGB(” & _

Abs((ColorCmp And &HFF&) – (Me.Point(xx1, yy1) And &HFF&)) & “,” & _

Abs((ColorCmp And &HFF00&) – (Me.Point(xx1, yy1) And &HFF00&)) / &H100& & “,” & _

Abs((ColorCmp And &HFF0000) – (Me.Point(xx1, yy1) And &HFF0000)) / &H10000 & “)”

Else

Label1.Move xx, yy

Label1.Caption = “当前大小” & (xx1 – xx) & “*” & (yy1 – yy) & vbCrLf & “当前RGB(” & _

Abs((ColorCmp And &HFF&) – (Me.Point(xx1, yy1) And &HFF&)) & “,” & _

Abs((ColorCmp And &HFF00&) – (Me.Point(xx1, yy1) And &HFF00&)) / &H100& & “,” & _

Abs((ColorCmp And &HFF0000) – (Me.Point(xx1, yy1) And &HFF0000)) / &H10000 & “)”

End If

End If

End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then

Dim xxSave As Integer

Dim yySave As Integer

xx1 = X

yy1 = Y

Label2.Visible = True

If xx < xx1 And yy < yy1 Then

Label2.Move xx, yy, xx1 – xx, yy1 – yy

ElseIf xx > xx1 And yy < yy1 Then

Label2.Move xx1, yy, xx – xx1, yy1 – yy

ElseIf xx < xx1 And yy > yy1 Then

Label2.Move xx, yy1, xx1 – xx, yy – yy1

ElseIf xx > xx1 And yy > yy1 Then

Label2.Move xx1, yy1, xx – xx1, yy – yy1

End If

Line1.Visible = False

Line2.Visible = False

Line3.Visible = False

Line4.Visible = False

End If

End Sub

Private Sub Label1_Click()

Me.Cls

Me.Move Label2.Left * 15, Label2.Top * 15, Label2.Width * 15, Label2.Height * 15

hDCtmp = GetDC(0)

BitBlt Me.hdc, -Me.Left / 15, -Me.Top / 15, Me.Width, Me.Height, hDCtmp, a, b, vbSrcCopy

ReleaseDC 0, hDCtmp

SavePicture Me.Image, App.Path & “\” & “截屏” & Minute(Time) & Second(Time) & “.jpg”

End

End Sub

Private Sub Label2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then

xx = X / 15

yy = Y / 15

If Label2.MousePointer = vbNormal Then

z = 1

Else

z = 2

End If

End If

End Sub

Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

X = X / 15

Y = Y / 15

If (X + 10 >= Label2.Width And Y + 10 >= Label2.Height) Then ‘右下\左上角

Label2.MousePointer = vbSizeNWSE

If z = 2 Then

If X >= 5 Then

Label2.Width = X

End If

If Y >= 5 Then

Label2.Height = Y

End If

End If

Else

If z = 1 Then

Label2.Left = Label2.Left + X – xx

Label2.Top = Label2.Top + Y – yy

End If

Label2.MousePointer = vbNormal

End If

Label1.Caption = “点此保存” & vbCrLf & _

“图片宽 ” & Label2.Width & vbCrLf & “图片高 ” & Label2.Height & vbCrLf & “当前RGB(” & _

Abs((ColorCmp And &HFF&) – (Me.Point(Label2.Left + X, Label2.Top + Y) And &HFF&)) & “,” & _

Abs((ColorCmp And &HFF00&) – (Me.Point(Label2.Left + X, Label2.Top + Y) And &HFF00&)) / &H100& & “,” & _

Abs((ColorCmp And &HFF0000) – (Me.Point(Label2.Left + X, Label2.Top + Y) And &HFF0000)) / &H10000 & “)”

Call label1W_Move

End Sub

Private Sub Label2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

z = 0

End Sub

Private Sub label1W_Move()

If Label2.Left + Label2.Width + 100 < Me.Width / 15 Then

Call label1H_Move(Label2.Left + Label2.Width)

ElseIf Label2.Left – 50 > 0 Then

Call label1H_Move(Label2.Left – Label1.Width)

Else

Call label1H_Move(Label2.Left)

End If

End Sub

Private Sub label1H_Move(i As Integer)

If Label2.Top + Label2.Height + 100 < Me.Height / 15 Then

Label1.Move i, Label2.Top + Label2.Height

ElseIf Label2.Top – 50 > 0 Then

Label1.Move i, Label2.Top – Label1.Height

Else

Label1.Move i, Label2.Top

End If

End Sub

如何用MFC编写一个程序,获得整个屏幕的截图并保存为bmp格式?

代码 大概就是这样 有几个关键函数仔细一下,要是要完整代码呢留言

CDC memDC;

CBitmap memBitmap,*pOldBitmap;

CWindowDC dc(GetDesktopWindow());

memDC.CreateCompatibleDC(&dc);

int nWidth,nHeight;

/* nWidth=GetSystemMetrics(SM_CXSCREEN);

nHeight=GetSystemMetrics(SM_CYSCREEN);*/

CRect rect;

GetDesktopWindow()->GetWindowRect(rect);

ClientToScreen(&rect);

nWidth=rect.Width();

nHeight=rect.Height();

memBitmap.CreateCompatibleBitmap(&dc,nWidth,nHeight);

pOldBitmap=memDC.SelectObject(&memBitmap);

// memDC.StretchBlt(0,0,rect.Width(),rect.Height(),&dc,0,0,rect.Width(),rect.Height(),SRCCOPY);

memDC.BitBlt(0,0,nWidth,nHeight,&dc,0,0,SRCCOPY);

BITMAPFILEHEADER BMFhead;

BITMAPINFOHEADER BMIhead;

BMFhead.bfReserved1=0;

BMFhead.bfReserved2=0;

BMFhead.bfOffBits=sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER);

BMFhead.bfSize=BMFhead.bfOffBits+nWidth*nHeight*4;

BMFhead.bfType=0x4d42;

BMIhead.biBitCount=32;

BMIhead.biClrImportant=0;

BMIhead.biClrUsed=0;

BMIhead.biSizeImage=0;

BMIhead.biXPelsPerMeter=0;

BMIhead.biYPelsPerMeter=0;

BMIhead.biCompression=BI_RGB;

BMIhead.biHeight=nHeight;

BMIhead.biPlanes=1;

BMIhead.biSize=sizeof(BITMAPINFOHEADER);

BMIhead.biWidth=nWidth;

DWORD dwSize=nWidth*nHeight*4;

BYTE *pData=new BYTE[dwSize];

GetDIBits(memDC.m_hDC,(HBITMAP)memBitmap.m_hObject,0,nHeight,pData,(LPBITMAPINFO)&BMIhead,DIB_RGB_COLORS);

CFile file;

file.Open(“test.bmp”,CFile::modeCreate | CFile::modeWrite);

file.Write(&BMFhead,sizeof(BITMAPFILEHEADER));

file.Write(&BMIhead,sizeof(BITMAPINFOHEADER));

file.Write(pData,dwSize);

file.Close();

memDC.SelectObject(pOldBitmap);

MessageBox(“绘图完毕”);

GetParent()->ShowWindow(SW_SHOW);