Autor Beitrag
amazing Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Mo 12.05.08 18:10 
wie muss ich das deklarieren?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 12.05.08 19:20 
Was meinst du damit? Die Funktion gibt dir das Handle des Fenster zurück, das gerade den Eingabefokus besitzt:
Suche bei Google GETFOREGROUNDWINDOW
-->
msdn.microsoft.com/e...ms633505(VS.85).aspx
amazing Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Di 13.05.08 00:12 
Ah hat sich erledigt.
Gibt es auch eine Funktion, die das Handle des Editfeldes eines aktiven Fensters liefert?
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Di 13.05.08 06:38 
user profile iconamazing hat folgendes geschrieben:
Ah hat sich erledigt.
Gibt es auch eine Funktion, die das Handle des Editfeldes eines aktiven Fensters liefert?



ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
function GetSysFocus : HWND; 
var 
  ThreadID, CurrThrId: cardinal; 
begin 
  Result := 0; 
  ThreadID := GetWindowThreadProcessID(GetForegroundWindow, nil); 
  CurrThrId := GetCurrentThreadId; 
  if ThreadID <> CurrThrId then 
  begin 
    if AttachThreadInput(ThreadID, CurrThrId, true) then 
    begin 
      Result := GetFocus; 
      AttachThreadInput(ThreadID, CurrThrId, false); 
    end; 
  end 
  else 
    Result := GetFocus; 
end;
amazing Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Fr 16.05.08 15:30 
Danke funktioniert jetzt alles

Hab ein wenig probiert ein Passwort auf einer zweiten form abzufragen, um bei Richigkeit des Passwortes das eigentliche form zu öffnen, bis jetzt leider ohne Erfolg.

Hat da jemand eine Idee für?