AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Active Desktop aktivieren

Ein Thema von mumu · begonnen am 4. Feb 2004 · letzter Beitrag vom 5. Feb 2004
Antwort Antwort
mumu

Registriert seit: 28. Okt 2003
Ort: Bamberg
519 Beiträge
 
#1

Active Desktop aktivieren

  Alt 4. Feb 2004, 14:09
Hi!

weiß jemand, wie man den Active Desktop mit Delphi aktivieren bzw. deaktivieren kann?

danke schonmal
  Mit Zitat antworten Zitat
mumu

Registriert seit: 28. Okt 2003
Ort: Bamberg
519 Beiträge
 
#2

Re: Active Desktop aktivieren

  Alt 5. Feb 2004, 10:44
also ich bin jetzt selbst auf die lösung gekommen. Falls es einem Interessiert hier ein Beispielcode:
Delphi-Quellcode:
function AkivierenActiveDesktop(activate: boolean): Boolean;
const
  CLSID_AD: TGUID = '{75048700-EF1F-11D0-9888-006097DEACF9}';
var
  hObject: IUnknown;
  AD: IActiveDesktop;
  ComponentsOpt: TComponentsOpt;
begin
  hObject := CreateComObject(CLSID_AD);
  AD := hObject as IActiveDesktop;
  try
    ComponentsOpt.dwSize:=SizeOf(ComponentsOpt);
    AD.GetDesktopItemOptions(ComponentsOpt,0);
    ComponentsOpt.fActiveDesktop:=activate;
    AD.SetDesktopItemOptions(ComponentsOpt,0);
    AD.ApplyChanges(AD_APPLY_ALL or AD_APPLY_FORCE);
  finally
  end;
end;
  Mit Zitat antworten Zitat
Benutzerbild von Jens Schumann
Jens Schumann

Registriert seit: 27. Apr 2003
Ort: Bad Honnef
1.644 Beiträge
 
Delphi 2009 Professional
 
#3

Re: Active Desktop aktivieren

  Alt 5. Feb 2004, 11:43
Hallo,
wenn Du noch verrätst was TComponentsOpt ist, dann könnet man Deine Lösung auch nachvollziehen.
  Mit Zitat antworten Zitat
mumu

Registriert seit: 28. Okt 2003
Ort: Bamberg
519 Beiträge
 
#4

Re: Active Desktop aktivieren

  Alt 5. Feb 2004, 11:56
Dazu ein Auszug aus der MSDN.

Zitat:
COMPONENTSOPT Structure

--------------------------------------------------------------------------------

Contains the desktop item options.

Syntax

typedef struct _tagCOMPONENTSOPT {
DWORD dwSize;
BOOL fEnableComponents;
BOOL fActiveDesktop;
} COMPONENTSOPT;
Members

dwSize
DWORD value that contains the size of the structure.
fEnableComponents
BOOL value that determines if desktop items are enabled.
fActiveDesktop
BOOL value that determines if the Active Desktop is enabled.
Structure Information

Header shlobj.h
Minimum operating systems Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0
  Mit Zitat antworten Zitat
Antwort Antwort


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 17:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz