hi, i would like to apply the xp theme to my msforms in (excel) vba. i have not been able to find any information on doing this. i saw this done in a stand alone xla so i know it works. any help would be greatly appreciated. -b
Hi, thanks for the response. Only the title bar and border itself seem to be drawn in the XP theme. All of the controls I place on the userform are still not in the XP theme. For example, the buttons are rectangular, the option buttons are black bullseyes and the groupbox is a rectangle. With the XP theme they should have rounded edges and subtle colors applied to them. On my machine, in the VBE I have the code window open and a smaller tree view of the project open as well. The project window has scrollbars that have an XP theme to them, while the code window has the standard windows theme. Is something not set correctly on my machine Thanks.
Hi, I believe the above examples only apply to stand alone VB applications - but maybe I am not understanding. I was asking about getting the intrinsic MSFORMS that are used in Excel as the userforms and called from VBA. I have Office 2003 and windows XP. Thanks.
On my side, it is also the same. The reason is that, to display XP style
1. The display properties on Windows system need to be set as Windows XP theme
and
2. The application uses common control 6.0
However, in VBA and VBE design environment, the default controls are forms control (we can right click on toolbox and select Additional Controls to check), not common control 6.0. So if we need to enable these buttons to have XP appearance, we need to use the buttons in Common Control 6.0. Not every forms control has its corresponding common control 6.0 control in VBE. You may need to write or buy specific XP style control if it is missing (but it may lack functionality of some Excel built-in controls). It will make applications very complex.
From the email, my understanding of the problem is as follows. If there is misunderstanding, please correct me. You want to make the user form in Excel to have Windows XP style and appearance.
What is the version of Windows and Excel For Windows 2000, there is no intrinsic support (we need to write own code to simulate the behavior and Microsoft does not support it). The version of Windows determines the version of COMCTL32.DLL and UxTheme API, which is important for creating XP visual style (Windows earlier than Windows XP may not have necessary version of COMCTL32.DLL). Usually to enable an application to have Windows XP style, we have the following methods: 1. Use manifest file. 2. Call UxTheme API calls to draw the various objects provided by current Windows XP Theme.
*** If you can provide me with the details that the engineer requested, I'll make sure he sees it and do further research for you. -brenda (ISV Buddy Team)
xp style to vba forms
mido1971
swirl80
Lucrecio Menezes
Here's the engineer's response:
I understand that it is Windows XP / Office 2003. How do you reproduce the problem I tested on my Windows XP / Office 2003:
1. Open Excel 2003.
-brenda (ISV Buddy Team)
Wardster
However, in VBA and VBE design environment, the default controls are forms control (we can right click on toolbox and select Additional Controls to check), not common control 6.0. So if we need to enable these buttons to have XP appearance, we need to use the buttons in Common Control 6.0. Not every forms control has its corresponding common control 6.0 control in VBE. You may need to write or buy specific XP style control if it is missing (but it may lack functionality of some Excel built-in controls). It will make applications very complex.
-brenda (ISV Buddy Team)
Greg Y
Per one of our support engineers:
1. Use manifest file.
2. Call UxTheme API calls to draw the various objects provided by current Windows XP Theme.
Using Windows XP Visual Styles
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnwxp/html/xptheming.asp
http://www.vbaccelerator.com/home/VB/Code/Libraries/XP_Visual_Styles/Using_XP_Visual_Styles_in_VB/article.asp
***
If you can provide me with the details that the engineer requested, I'll make sure he sees it and do further research for you.
-brenda (ISV Buddy Team)