A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
5
Task/Mouse-position/Delphi/mouse-position-1.delphi
Normal file
5
Task/Mouse-position/Delphi/mouse-position-1.delphi
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
begin
|
||||
lblMousePosition.Caption := ('X:' + IntToStr(X) + ', Y:' + IntToStr(Y));
|
||||
end;
|
||||
15
Task/Mouse-position/Delphi/mouse-position-2.delphi
Normal file
15
Task/Mouse-position/Delphi/mouse-position-2.delphi
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
program Project1;
|
||||
{$APPTYPE CONSOLE}
|
||||
uses
|
||||
SysUtils, Controls, Windows;
|
||||
|
||||
var
|
||||
MyMouse : TMouse;
|
||||
begin
|
||||
MyMouse := TMouse.Create;
|
||||
While True do
|
||||
begin
|
||||
WriteLn('(X, y) = (' + inttostr(TPoint(MyMouse.CursorPos).x) + ',' + inttostr(TPoint(MyMouse.CursorPos).y) + ')');
|
||||
sleep(300);
|
||||
end
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue