Thema: Delphi Windows + D vorbeugen

Einzelnen Beitrag anzeigen

willnix

Registriert seit: 14. Apr 2007
Ort: Heidelberg
27 Beiträge
 
Delphi 7 Professional
 
#5

Re: Windows + D vorbeugen

  Alt 23. Sep 2007, 00:29
Falls nicht, dieser Code funktioniert beim mir (Vista!):
Delphi-Quellcode:
var
  wnd: HWND;
begin
  wnd := FindWindow('Progman', 'Program Manager');
  wnd := FindWindowEx(wnd, 0, 'SHELLDLL_DefView', nil);
  wnd := FindWindowEx(wnd, 0, 'SysListView32', 'FolderView');

  if wnd <> 0 then
  begin
    Form1.ParentWindow := wnd;
  end;
end;
Aber beachte bitte den Hinweis aus der Newsgroup, warum das keine gute Methode ist:
Zitat von Raymond Chen:
Windows that attach themselves to the desktop create
all sorts of stability problems and compatibility nightmares. (For example,
suppose Explorer decides to destroy the desktop and recreate it. When a
window is destroyed, all its child windows are destroyed, so POOF your
window just got destroyed.)
  Mit Zitat antworten Zitat