XP Themes and IE

W

Wells Caughey

I am writing a control that gets downloaded and run in Internet Explorer
and I would like the visual style of the controls to match the visual style
of the operating system. I know about .manifest and about
EnableVisualStyle() but these seem to only work with full blown executables
(.exe). I found a few promising threads in Google but the links in that
thread no longer work. Does anyone know how to enable visual styles in this
scenario, or if not where the link
http://www.gotdotnet.com/team/windowsforms/Themes.aspx has been moved to?

Thanks
Wells Caughey
 
Y

Ying-Shen Yu[MSFT]

Hi Wells,

Based on my research now I haven't found a way to enable visual style in IE
host scenario, EnableVisualStyle does not work in v1.1 but it works in .NET
v2.0, so I guess this is a limitation in .NET v1.1.

What are you looking for on page
http://www.gotdotnet.com/team/windowsforms/Themes.aspx
?
Windows Forms team now have their own portal site, maybe you can find the
information on www.windowsforms.net.

Let me know if you have any further questions on this issue.
Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
Y

Ying-Shen Yu[MSFT]

Hi Wells,

In .NET v1.0 and v1.1 you will need to do custom activation context
management to get visual styles for IE host scenario, however it needs some
P/Invoke which needs the Unmanaged code permission to work properly, You
may read this blog to know more about how windows forms implements the
visual style support in EnableVisualStyle method:
http://blogs.msdn.com/rprabhu/archive/2003/09/28/56540.aspx

If it's ok to have the Unmanaged Code permission in your application,
please let me know, I can send you a sample for how to create the
activation context management.

In .NET v2.0 you may use Application.EnableVisualStyle to enable visual
style in IE host scenario.

Thanks!
Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
W

Wells Caughey

Ying-Shen,

Thank you the link; the article explained the interaction between .NET and
XP very clearly. Unfortunately I don't think I can use the unmanaged API
because that would require the application to be fully trusted. Part of the
reason that we are opting to distribute the application as a control on a
web page is to cut down on administrative burdens, and requiring my app to
be fully trusted would require an administrator to reconfigure the .NET
security policy on potentially all of the client machines.

Thanks again,
Wells
 
Y

Ying-Shen Yu[MSFT]

Hi Wells,

Understood, and I guess the enterprise policy is not applicable in your
scenario right?

As this feature will be added in VS2005, You may try installing the Beta1
version to experience the XP theme support in IE, we are looking forward to
your ideas and suggestions and (of course) the bug report to make the next
release serve you better.

The VS.2005 beta1 is available for MSDN subscribers; Alternatively, you may
download the Express Editions at:
http://lab.msdn.microsoft.com/express/

If you meet any bugs or have a suggestion, please let us know through:
http://lab.msdn.microsoft.com/productfeedback/

And you may discuss with other community member and our Dev team directly
in the beta newsgroups.
http://communities.microsoft.com/newsgroups/default.asp?icp=whidbey&slci
d=us

Thanks!
Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
W

Wells Caughey

Ying-Shen,

I have downloaded the VS2005 beta, but there was some problem in image that
I downloaded and I couldn't ever get it to install. At this point, I think
I'll just wait for it to be mailed to me with rest of my MSDN Subscription.

Thanks again for all you help,
Wells
 

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