Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi CursorPosition (https://www.delphipraxis.net/113600-cursorposition.html)

Delphiturbo 10. Mai 2008 22:40


CursorPosition
 
Ist es möglich den Cursor wieder in seine alte Position zu setzen?
Delphi-Quellcode:
SetCursorPos(left+100, top+100);
??? // hier soll der Cursor zurück wo er vorher war

Blackheart 10. Mai 2008 22:43

Re: CursorPosition
 
Ja, alte Position merken.

Delphiturbo 10. Mai 2008 22:46

Re: CursorPosition
 
ich möchte aber nicht die Position notieren und eingeben, sondern automatisch berechnen. Gibt es keinen Code dafür z.B. CursorOldPos oder so was ? :mrgreen:

1234588 10. Mai 2008 23:09

Re: CursorPosition
 
wofuer gibts variablen?

bitsetter 10. Mai 2008 23:13

Re: CursorPosition
 
Du speicherst kurz vorher die alte Position in einer Variablen und setzt dann den Cursor später da wieder hin.
Delphi-Quellcode:
var
  OldPt: TPoint;
begin
  OldPt:= Mouse.CursorPos;
  SetCursorPos(left+100, top+100);

  Mouse.CursorPos:= OldPt;// hier soll der Cursor zurück wo er vorher war

Delphiturbo 11. Mai 2008 10:50

Re: CursorPosition
 
Sehr gut :)
Danke!

Blackheart 11. Mai 2008 20:57

Re: CursorPosition
 
Zitat:

Zitat von Delphiturbo
Sehr gut :)
Danke!

Wie es sein sollte, mal wieder ohne Eigeninitiative zum Ziel. :thumb:


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:34 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz