View Single Post
  #2  
Old 01-06-2001, 09:01 PM
douglas douglas is offline
Senior Member
 
Join Date: Jul 2001
Posts: 7,695
Default RE: Detecting active desktop -- systemparametersinfo?

Check for it using the shell32.dll. Like this:

uses shlobj

var
sfs: ShellFlagState;

try
SHGetSettings(sfs,SSF_DESKTOPHTML);
if sfs.Data > 0 then
ShowMessage('Active Desktop enabled');
except
//error handling
end;

The reason you need to make sure you have a try except is because if you run this code on a machine that does not have active desktop support, it will give an error because it does not recognize the dwmask parameter.

See Microsoft website for more details:

http://msdn.microsoft.com/library/psdk/shellcc/shell/functions/SHGetSettings.htm
Reply With Quote