[AccessD] (no subject)

Stuart McLachlan stuart at lexacorp.com.pg
Sun May 26 01:04:03 CDT 2013


Not a good idea.  

Firstly, themes are system wide settings.  An application which chages the useers system 
wide preferences, even temporarily is bad..   They affect much more than just   the 
appearance of Windows controls.

Secondly, Visual Styles, which is what I think you actually want to change, are different in 
different OS versions.

If you REALLY must, a call to the SetWindowsTheme function in the  UXThemes.dll (XP and 
later)  may do the trick:

Public Declare Function SetWindowTheme Lib "uxtheme.dll" (ByVal hWnd As HandleRef, 
ByVal pszSubAppName As String, ByVal pszSubIdList As String) As Integer

-- 
Stuart 

On 25 May 2013 at 22:08, Rocky Smolin wrote:

> Dear List:
>  
> Is there a way to set the Windows theme through VBA.  I'm using 2003.  
>  
> I can set the app to inherit the theme using Application.SetOption "Themed
> Form Controls",True  but need a way to set the theme so that the appearance
> of the controls on an app that is to be distributed will always appear the
> same.  
>  
> And the theme can be returned to it's original state when the app closes (if
> I can SET it I assume I can GET it).
>  
> Of course this does present a problem of the user's theme being changed by
> the program, even if temporarily, but, one problem at a time.
>  
> MTIA
>  
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.bchacc.com <http://www.bchacc.com/> 
> www.e-z-mrp.com <http://www.e-z-mrp.com/> 
> Skype: rocky.smolin
>  
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list