By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,948 Members | 1,975 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,948 IT Pros & Developers. It's quick & easy.

No-Click and Application manifest file.

P: n/a
I have a windows form application distributed via no click deployment. I am
thinking about adding xp theme support using an application manifest. I know
the manifest is not downloaded to the client machine because of this I
embedded the manifest as resource in the *.exe file, as recommended by many
people. If I run the application using a url(No click) then xp style
visualization isn't enabled. If i run it locally(clicking on the .exe file)
then it is enabled. Because of this i created a IEExec.exe.manifest and
placed it in the framework directory and xp style is supported even using no
click. Of course this is not the way to do it. Does any one know how to
actually support xp theme in no click deployment situations.
Application.EnbableVisualStyle()
Application.DoEvents() does not work throws an SEHException. thanks for
any suggestions.
Jul 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to enable visual style on a no
touch deployment app. If there is any misunderstanding, please feel free to
let me know.

When you need to apply XP Visual Styles to a Windows application that runs
as a separate process. you can either use a separate manifest file or embed
it in the resource as RT_MANIFEST(with index 1). If you build your
application in VS .NET 2003, then you can take advantage of the new method
EnableVisualStyles. But if you run your windows application on the web via
No-touch deployment, then the manifest approach will not work.

So when you run your windows application on the web via No-touch
deployment, you are running inside the context of another process such as
IE. The manifest will not be looked at. The only official solution is to
use Application.EnableVisualStyles which applies XP visual style to the
activation context before any window is created.

I tried it on my computer, and it works fine. Here is an example:

Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new Form1());

Make sure that you have set the FlatStyle property to FlatStyle.System.

Also, here is a community thread that discussing the same problem. HTH.

http://groups.google.com/groups?hl=z...4-43,GGLD:en&t
hreadm=6c7eb516.0311270224.409a5ff3%40posting.goog le.com&rnum=1&prev=/groups
%3Fq%3DEnableVisualStyles%2Bdeployment%26hl%3Dzh-CN%26lr%3D%26rls%3DGGLD,GGL
D:2004-43,GGLD:en%26selm%3D6c7eb516.0311270224.409a5ff3%2 540posting.google.c
om%26rnum%3D1

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

Jul 21 '05 #2

P: n/a
HI, thanks for the response.
From my experience, using
Application.EnableVisualStyles();
Application.DoEvents(); do not work and thorws an SEHException.

The following blog explains it.
http://blogs.msdn.com/rprabhu/archiv.../28/56540.aspx
I knew , from testing, when you run the application via No_touch ,it is
run under IE's context. Tthat is the reason why i created an
IEExec.exe.manifest and everything worked fine. So the bottom line, Enabling
XP style isn't that simple or it isn't possible with out any problems.
"Kevin Yu [MSFT]" wrote:
Hi

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to enable visual style on a no
touch deployment app. If there is any misunderstanding, please feel free to
let me know.

When you need to apply XP Visual Styles to a Windows application that runs
as a separate process. you can either use a separate manifest file or embed
it in the resource as RT_MANIFEST(with index 1). If you build your
application in VS .NET 2003, then you can take advantage of the new method
EnableVisualStyles. But if you run your windows application on the web via
No-touch deployment, then the manifest approach will not work.

So when you run your windows application on the web via No-touch
deployment, you are running inside the context of another process such as
IE. The manifest will not be looked at. The only official solution is to
use Application.EnableVisualStyles which applies XP visual style to the
activation context before any window is created.

I tried it on my computer, and it works fine. Here is an example:

Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new Form1());

Make sure that you have set the FlatStyle property to FlatStyle.System.

Also, here is a community thread that discussing the same problem. HTH.

http://groups.google.com/groups?hl=z...4-43,GGLD:en&t
hreadm=6c7eb516.0311270224.409a5ff3%40posting.goog le.com&rnum=1&prev=/groups
%3Fq%3DEnableVisualStyles%2Bdeployment%26hl%3Dzh-CN%26lr%3D%26rls%3DGGLD,GGL
D:2004-43,GGLD:en%26selm%3D6c7eb516.0311270224.409a5ff3%2 540posting.google.c
om%26rnum%3D1

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

Jul 21 '05 #3

P: n/a
Hi,

I would like to know if creating a manifest file resolved the problem? Is
there anything I can help?

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

Jul 21 '05 #4

P: n/a
I have to create two manifests, one for my application and one for
IEExec.exe. Manifest for IEExec.exe is neccessary to support xp stlyle for
no-click applications. Do you know what causes the SEHException?, this
happens usually when i close other forms. We catcah every single exceptions
and when this is thrown, the applciation simply terminates. If i know what
causes this then I might be able to work around it and I could use
Application.enableVisualStyles() and
Application.DoEvents(). So i dont need to use use two manifests. Please let
me know. thanks.

"Kevin Yu [MSFT]" wrote:
Hi,

I would like to know if creating a manifest file resolved the problem? Is
there anything I can help?

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

Jul 21 '05 #5

P: n/a
You're welcome. Thanks for sharing your experience with all the people
here. If you have any questions, please feel free to post them in the
community.

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

Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.