XP Styles on Excel Form

P

Peter Huang [MSFT]

Hi

I think it is hard to do that.
So far we enable the XP styles by using the manifest file in the unmanaged
code.
That is for the controls in the comctl32.ocx.
Here is KB link for your reference.
INFO: Visual Basic 6.0 Does Not Support Windows XP Themes or Visual Styles
(309366)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;309366

For excel, if we add the manifest file as above and named it as
Excel.exe.manifest and save it where the excel.exe is located.
If we use the controls from comctl32.ocx,e.g. Microsoft Slider Control,
Microsoft StatusBar control, it will be enable the XP Style.
But as above it is not supported.

In addition, the Control in the default control which will be added onto
the UserForm is not from the comctl32.ocx, it is Office buildin control, so
that did not apply to the scenario.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
I

Ivan F Moala

As Peter has indicated, you cannot use XP Styles except if you us
control ocxs/dlls that support this.

I have done this with the progressbar. You need to create this via Wi
API's using the progress control from the comctl32.dll Version 6.0 i
conjunction with the manifest.
As Peter has said the controls supported in this method are Microsof
Slider Control, Microsoft StatusBar control and a few more. For button
I beleive that is possible but requires a lot more work in the API area
 
D

Dave Mak

Thanks, this works good for slider control and combo box. However, I'd
really like to use XP style text box, label and button controls.

In VB6 I can add Microsoft Windows Common Controls 6.0, this is the
MSCOMCTL, but in Excel it doesn't show up. So it seems like I can't have an
XP button on an Excel vba form.

Any other thoughts would be appreciated.

Dave
 
P

Peter Huang [MSFT]

Hi

It is hard to do that because we need to call the UxTheme api directly
which is commonly written in using C++ code.
Also customize use API in this way in the VBA UserForm may cause unexpected
error, because the VBA form is running in the Excel.exe process, it is not
truely an application.
Here is a document you may take a look.
Using Visual Styles with a Custom Control
Using Windows XP Visual Styles
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/
xptheming.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Y

Yan-Hong Huang[MSFT]

Hi Dave,

I am reviewing this issue thread. Do you have any more concerns on Peter's
reply? If there is any unclear, please feel free to post here and we will
follow up.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top