Autor Beitrag
jaenschi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 89

Win XP, Debian
D7
BeitragVerfasst: Di 15.02.05 15:45 
Hallo,
ich möchte mit meinen Programm ALLE sichtbaren Fenster minimieren.
Ich hab schon folgende Funktion gefunden:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure All_Minimize;
Var lngHwnd:THandle;
begin
  lngHwnd := FindWindow('Shell_TrayWnd', '');
  If lngHwnd>0 Then
    PostMessage(lngHwnd, WM_COMMAND, Min_ALL, 0)
end;

Aber diese Funktion minimiert nicht alle Fenster. Fenster wie Miranda oder Installer-Programme bleiben
sichtbar!
Gibt es noch eine andere Möglichkeit ALLE Fenster zu minimieren?
Übrigens: Ich(mein Programm) kenne die Namen der anderen Fenster nicht :roll:

THX
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Di 15.02.05 15:52 
Hallo,
Hab vor kurzem dasselbe Problem lösen wollen, und bin dann darauf gestossen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure MinimizeAll;
Begin
  { <Window key> + 'M' minimizes all windows, <Win><Shift>+'M'
    restores them }

  keybd_event( VK_LWIN, MapvirtualKey( VK_LWIN, 0), 0, 0 );
  keybd_event( Ord('M'), MapvirtualKey( Ord('M'), 0), 0, 0 );
  keybd_event( Ord('M'), MapvirtualKey( Ord('M'), 0), KEYEVENTF_KEYUP, 0);
  keybd_event( VK_LWIN, MapvirtualKey( VK_LWIN, 0), KEYEVENTF_KEYUP, 0 );
end;

Das simuliert einfach den Hotkey Windows-M, der alle Fenster minimiert.

_________________
We are, we were and will not be.
jaenschi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 89

Win XP, Debian
D7
BeitragVerfasst: Di 15.02.05 15:56 
Funktioniert auch, nur mein Miranda-Fenster wehrt sich noch immer :(
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Di 15.02.05 16:18 
Wie wäre es wenn du einfach Fenster für Fenster durch gehst und eine Minimier-Message verschickst.
Gibts da ein Problem? (kann es momentan nicht testen)