XP Theme Not Working

G

Guest

I have a manifest file called app.exe.manifest and it works great on any
developers machine, but once we deploy the application (smart client) on the
web server and the users use the url to bring up the application it doesn't
have the xp themes any longer. Is the application using the web server to
figure out wether to use the theme? I thought the application got cached down
to the user and it would have used the users machine to figure out wether to
use the xp themes or not?

Any help would be appreciated.
 
J

Jeffrey Tan[MSFT]

Hi MasterBlaster,

Thanks for your post.

Do you use .Net Framework1.1 or 1.0? In .Net 1.1, there is no need for us
to use manifest to enable the XP theme, we can just use
Application.EnableVisualStyles() before Application.Run(new Form1()) to
enable the theme support.

If you use .Net 1.0, we still have to use the manifest. In smart client
application, when the client user is accessing the application, the exe
file will be downloaded to the IE cache of the client user, however the
manifest file will not be downloaded at all, so there is no instruction for
the application to enable visual style. To resolve this problem, we can
just embeded the manifest file into the exe file as resource, then when the
exe is downloaded, the manifest file is downloaded as well(because it is
embeded in the PE file).

For more information, about how to embed the manifest as resource into the
exe file, please refer to the "Add the Manifest to the Executable File"
section in the article below:
"Using Windows XP Visual Styles With Controls on Windows Forms"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechar
t/html/vbtchUsingWindowsXPVisualStylesWithControlsOnWindowsForms.asp

Note: in .Net 1.1, with Application.EnableVisualStyles calling, because
there is no manifest file, this problem will not exist.

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
J

Jeffrey Tan[MSFT]

Hi MasterBlaster,

Does my reply make sense to you? Is your problem resolved? If you still
have any concern, please feel free to tell me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

Ok I followed the steps exactly and when I bring up the application via the
url from the web server it still doesn't have the XP Theme.

I performed the steps on the exe on both the exe in the Bin and the Debug
folder, but I only moved the Bin version to the web server. It seems after
the code gets rebuilt the RT_MANIFEST resource gets wiped out.

Any hints t get this working would be appreciated. All the client machines
that will be downloading the smart client have XP SP2 machines.

Thanks
 
G

Guest

We are using 1.1 SP1. We started of using Application.EnableVisualStyle, but
we ran into situations where it would cause errors and I did some research
and they were known bugs. So we had to backoff using it and went with the
manifest file which has no issues.

I'll try and get the example. Thanks
 
G

Guest

I checked and we don't have outlook express loaded on our machines. Do you
guys have an ftp site I go to download the example?

Thanks

MasterBlaster said:
We are using 1.1 SP1. We started of using Application.EnableVisualStyle, but
we ran into situations where it would cause errors and I did some research
and they were known bugs. So we had to backoff using it and went with the
manifest file which has no issues.

I'll try and get the example. Thanks

"Jeffrey Tan[MSFT]" said:
Hi MasterBlaster,

Thanks for your feedback.

It seems that you still did not tell me which version of .Net you are
using. With .Net1.1, there is no need for us to embed resource into the
resulting assembly, we can just invoking Application.EnableVisualStyle
method to get this done.

I have created a sample assembly with manifest embed into the it, it works
well on my side. I suggest you test it on your side. I have attached the
assembly in this reply.(You can get it through Outlook Express)

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights
 
J

Jeffrey Tan[MSFT]

Hi MasterBlaster,

Currently, there is no public link available. Can you provide an email link
to me, then I will attach the assembly and email to you. Also, you can
first email to me with the address (e-mail address removed)(remove
"online." from the email address)

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
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

Similar Threads


Top