Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2001, 05:15 AM
BlakeBlake BlakeBlake is offline
Senior Member
 
Join Date: Jan 2001
Posts: 156
Default Detecting active desktop -- systemparametersinfo?

I need to know how to detect if active desktop is switched on.
My friend said that it could be done using systemparametersinfo but I cant find how to do it.
can someone please tell me how to do this.

Reply With Quote
  #2  
Old 01-06-2001, 08: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
  #3  
Old 01-07-2001, 04:06 AM
BlakeBlake BlakeBlake is offline
Senior Member
 
Join Date: Jan 2001
Posts: 156
Default RE: RE: Detecting active desktop -- systemparametersinfo?

I'll check this out and then accept as answer, cheers
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 10:30 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.