On Mar 30, 2007, at 9:04 AM, tbuchler wrote:

> Is there a simple way to detect that the user has selected Vista's  
> Aero desktop scheme?

The question is two fold
  1) are they actually running Vista ?
  2) is Vista using Aero as the desktop window manager ?

In Vista a person can select to run a program in compatibility mode  
and then the existng methods in WFS tell you that you are running on  
NT, XP SP 2 or what ever compatibility mode the user selected. So to  
correctly detect Vista you need to try and see if a function that  
only exists in Vista is exposed. Aaron clued me in to this.
Something like
        function IsReallyVista() as boolean
        
          if System.IsFunctionAvailable( "GetProductInfo", "Kernel32" ) then
            return true
          else
            return false
          end if
        
        end function

some caveats
    It will report true for anything released *after* Vista as well
    This API could be shimmed into older versions of Windows via  
service packs and then you'd have to find a different function

As for whether Aero is enabled it seems like HRESULT  
DwmIsCompositionEnabled( BOOL *pfEnabled );
will be the right item to check





_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to