Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   General (http://www.delphipages.com/forum/forumdisplay.php?f=2)
-   -   Detecting active desktop -- systemparametersinfo? (http://www.delphipages.com/forum/showthread.php?t=18122)

BlakeBlake 01-06-2001 06:15 AM

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.

:)

douglas 01-06-2001 09:01 PM

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

BlakeBlake 01-07-2001 05:06 AM

RE: RE: Detecting active desktop -- systemparametersinfo?
 
I'll check this out and then accept as answer, cheers :)


All times are GMT. The time now is 02:38 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.