Fórum Posicao de Mouse #370390
12/05/2009
0
Bertu
Curtir tópico
+ 0Posts
12/05/2009
Woinch
Qualquer dúvida favor postar.
Gostei + 0
12/05/2009
Desander
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Linha: TLabel;
Coluna: TLabel;
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Linha.Caption:= IntToStr(X);
Coluna.Caption:= IntToStr(Y);
end;
end.
Gostei + 0
12/05/2009
Bertu
var Pt : TPoint; begin Pt.x := WebBrowser1.Left + (110); Pt.y := WebBrowser1.Top + (75; Pt := ClientToScreen(Pt); Pt.x := Round(Pt.x * (65535 / Screen.Width)); Pt.y := Round(Pt.y * (65535 / Screen.Height)); Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_MOVE, Pt.x, Pt.y, 0, 0); Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTDOWN, Pt.x, Pt.y, 0, 0); Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTUP, Pt.x, Pt.y, 0, 0); end;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)