Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Windows XP Style - Include the Manifest in the Executable

Posted on 2003-11-14
10
Medium Priority
?
1,241 Views
Last Modified: 2012-06-27
Hi Experts,

I am trying to implement Windows XP styles in my WinForm application. I followed closesly the instructions on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchUsingWindowsXPVisualStylesWithControlsOnWindowsForms.asp as well as some others. However there are still 2 open issues:

1. How can I include the manifest file in the executable AUTOMATICALLY and not manually after the build process?

2. How can I check if the executable contains the manifest itself so that I show Windows XP styles?

The above article in MSDN is somewhat wrong because it shows the way to include the manifest MANUALLY in the executable but in the code it is checked that the manifest exists as a separate file, which is not very clever.

The whole story with the manifest being aside makes setup projects very difficult to handle - now I cannot just say take the result of the original project and create a setup, I need to add also the manifest or to first manually add it in the exe...

Thanks for the help.
TheAvenger
0
Comment
Question by:TheAvenger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 3

Expert Comment

by:Sijin
ID: 9753601
If you are using .Net Framework 1.1 you can set the EnableVisualStyles property of the application object to enable winxp styles. But you also will have to make all controls have FlatStyle = System.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsapplicationclassenablevisualstylestopic.asp

0
 
LVL 20

Author Comment

by:TheAvenger
ID: 9754125
The problem how to include the manifest file in the executable automatically is still interesting for me. However your solution Sijin solves my problem at the moment. So I will reward you points through a different question and leave this one open for more posts.

Please post an answer here so that I can accept it:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20799006.html
0
 
LVL 12

Expert Comment

by:vascov
ID: 9811268
You can use a post build action and/or a macro or add-in.
In the same article you mentioned initially there's a not to another article, which may be of help:

Creating a Visual Studio .NET Add-In to provide Windows XP Theme Support
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnperfmo/html/xpthemeaddin.asp?frame=true


BTW, even in .NET v1.1, do Application.DoEvents right after EnableVisualStyles. (this will solve some initialization issues that happen in some projects)

HTH
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 20

Author Comment

by:TheAvenger
ID: 9811292
OK, this could be a solution (both actually, the post build action and the macro) but how shall it include the manifest in the exe? Is there a command prompt command that can include it (I can put command prompt commands only in the post build event)?
0
 
LVL 3

Expert Comment

by:WiB
ID: 9811741
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 9811891
WiB: sounds just great but... it's for VC++ 6.0 and does not work for C# :-((
0
 
LVL 18

Expert Comment

by:testn
ID: 9815595
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 9816293
As you have seen above, I have read this link and it really works. But I have to do this MANUALLY every time I compile the executable and what I want is to include it AUTOMATICALLY. Can this be done at all?
0
 
LVL 18

Accepted Solution

by:
testn earned 1000 total points
ID: 9829679
Oops.... sorry about that...

try http://www.msjogren.net/dotnet/download.asp?thememe.zip and let me know
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 9830144
OK, this one worked. Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question