procedure TForm1Button2Click(Sender: TObject);
var
range:TBDColorRange;
Bit1,Bit2 : TBDBitmapData;
Left,Top : Integer;
b : Boolean;
target:String;
begin
Bit1:=TBDBitmapDataCreate; Bit2:=TBDBitmapDataCreate;
ranger:=5; rangeG:=5; rangeB:=5;
target:='1bmp';
if not Bit2LoadFromFile(target) then
begin
Bit1Free; Bit2Free; exit;
end;
Bit1CopyFormScreen();
b:=Bit1FindImage(Bit2,range,Left,Top);
if b then
begin
SetCursorPos(Left+20,Top+5) // 移到找到的图的坐标
end
else
Bit1Free;
Bit2Free;
end;
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Const LOGPIXELSX = 88 ' Logical pixels/inch in X Private Sub Form_Load()
Dim aa As Long
Dim hdc0 As Longhdc0 = GetDC(0)aa = GetDeviceCaps(hdc0, LOGPIXELSX)DebugPrint aa End Sub
以上就是关于Delphi屏幕找图已经可以找到了,有没有什么办法能获取到找到的屏幕图片的坐标,并移动过去,和颜色坐标,全部的内容,包括:Delphi屏幕找图已经可以找到了,有没有什么办法能获取到找到的屏幕图片的坐标,并移动过去,和颜色坐标,、VB 获得屏幕DPI值、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)