AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Klick auf aktives Fenster landet woanders
Thema durchsuchen
Ansicht
Themen-Optionen

Klick auf aktives Fenster landet woanders

Ein Thema von The Riddler · begonnen am 18. Okt 2008 · letzter Beitrag vom 19. Okt 2008
 
The Riddler
(Gast)

n/a Beiträge
 
#3

Re: Klick auf aktives Fenster landet woanders

  Alt 18. Okt 2008, 23:58
Hat sich erledigt.

Delphi-Quellcode:
procedure TForm1.Button4Click(Sender: TObject);
var
  wnd: THandle;
  Rec: TRect;
begin
  wnd := GetForegroundWindow;
  GetWindowRect(wnd, Rec);
  showmessage(inttostr(rec.Left+3) + ' x ' + inttostr(rec.top+3));
  SetCursorPos(rec.Left+30, rec.top+30);

  mouse_event(MOUSEEVENTF_LEFTDOWN,rec.Left+3, rec.top+3,0,0);
  mouse_event(MOUSEEVENTF_LEFTUP,rec.Left+3, rec.top+3,0,0);
end;
Zitat:
Da ist das Problem: If MOUSEEVENTF_ABSOLUTE value is specified, dx and dy contain normalized absolute coordinates between 0 and 65,535. The event procedure maps these coordinates onto the display surface. Coordinate (0,0) maps onto the upper-left corner of the display surface, (65535,65535) maps onto the lower-right corner.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:39 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz