Autor Beitrag
ex4ct
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67


Delphi 7
BeitragVerfasst: Mi 05.07.06 21:16 
Hallo,
Ich wollte bei Buttonklick den Titel des aktiven Fensters ermitteln unf in ein Textfeld einfügen!
Weiß villeicht jemand wie ich dass machen könnte?


Moderiert von user profile iconMotzi: Topic aus Sonstiges (Delphi) verschoben am Do 06.07.2006 um 10:48
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mi 05.07.06 22:14 
in dem du nach Suche in: Delphi-Forum, Delphi-Library AKTIV FENSTER TITEL suchst. ich bin fündig geworden ...

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
ex4ct Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67


Delphi 7
BeitragVerfasst: Mi 05.07.06 22:40 
Die 4 Themen die du gefunden hast, können mir nicht weiterhelfen!
Hast du villeicht meine Frage nicht ganz verstanden?
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mi 05.07.06 22:44 
Ok. dann sag mir mal wie du dashier übersehen konntest: x_X
www.delphi-forum.de/...iv+++fenster+++titel
Der zweite post von Sprint:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
const 
  S_MSG = 'Fenster: %d' + #13#10 + 'Titel: %s' + #13#10 + 'Dateiname: %s'
var 
  AppHWnd: HWND; 
  Title: String
  ProcessId: DWORD; 
  ProcessHandle: THandle; 
  FileName: String
begin 


  // Fenster ermitteln das im Vordergrund liegt 
  AppHWnd := GetForegroundWindow; 


  if IsWindow(AppHWnd) then 
  begin 
    // Fenstertext auslesen 
    SetLength(Title, GetWindowTextLength(AppHWnd) + 1); 
    SetLength(Title, GetWindowText(AppHWnd, PChar(Title), Length(Title))); 


    // Prozess ermitteln, der das Vordergrundfenster erstellt hat 
    if GetWindowThreadProcessId(AppHWnd, ProcessId) <> 0 then 
      if ProcessId <> 0 then 
      begin 
        ProcessHandle := OpenProcess(PROCESS_VM_READ or PROCESS_QUERY_INFORMATION, False, ProcessId); 
        if ProcessHandle <> 0 then 
        begin 
          SetLength(FileName, MAX_PATH + 1); 
          SetLength(FileName, GetModuleFileNameEx(ProcessHandle, 0, PChar(FileName), Length(FileName))); 
          CloseHandle(ProcessHandle); 
        end
      end
  end


  ShowMessage(Format(S_MSG, [AppHWnd, Title, FileName]));

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
ex4ct Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67


Delphi 7
BeitragVerfasst: Do 06.07.06 00:00 
Uuups sry ich danke dir ;-)
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Do 06.07.06 14:06 
Immer etwas genauer hinschauen ^^

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.