Xp Themes

G

Guest

I had my app using the

Windows.Forms.Application.EnableVisualStyles()
Windows.Forms.Application.DoEvents()

And I was receiving some errors, so I want to go to a manifest file, but I
copied one off a newsgroup -- see below

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-c­om:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="MyApp"
type="win32"
/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common­-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1­df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

When you have this as a file do the following in the VS .NET IDE:
1. Select File>Open File
2. Open your executable file
3. Right click the parent node and select 'Add Resource'
4. Choose Import and select the manifest file
5. When the box appears asking for the type of resource type RT_MANIFEST
6. The resource identifier needs to be 1, so select '101' in the
RT_MANIFEST folder and change it to 1


I followed these steps and when I try to run my application in debug or
right from the exe I get.

"This application has failed to start because the application configuration
is incorrect. Reinstalling the application may fix this problem.

Any help would be appreciated.
 
J

Jamin Guy

Just name your manifest file the same name as your exe file except add
a .manifest extension to it. So if your exe is name Form1.exe, your
manifest file should be named Form1.exe.manfiest and should reside in
the same directory as the exe file. When you add it as a resource to
the exe, you are embedding it in the exe, which I have done before and
haven't had any problems.
 
G

Guest

If you read my explaination I did all that and I'm coming up with an error.
So I need some help with what I put in my manifest file and the directions I
followed to embed the manifest file with the exe.
 
C

Cor Ligthert

MasterBlaster,
If you read my explaination I did all that and I'm coming up with an
error.

Where, when you want help, than this are really the replies you would have
to give.

Cor
 
J

Jeffrey Tan[MSFT]

Hi MasterBlaster,

Thanks for your post.

Do you use .Net Framework 1.1? Can you show us which error generate when
you are using EnableVisualStyles() method?

Do you use a Appname.exe.config file in your project? Normally, this
problem may be caused by placing encoding="Windows-1252" statement in your
application config file, which is conflicted with the encoding setting in
the manifest file. So we should just remove this encoding statement. This
may get rid of your problem.

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.
 
G

Guest

Try putting "Microsoft.Winweb" in front of your applications name (I assume
Myapp is the name of your .exe):

<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="Microsoft.Winweb.Myapp"
type="win32"
/>

As someone else has pointed out, you do not need to embed the manifest file
in your exe. You can just rename the manifest file to Myapp.exe.manifest and
deploy it in the same directory as your exe.

HTH, Jakob.
 
G

Guest

I'm all set I figured it out last night.

Thanks

Cor Ligthert said:
MasterBlaster,


Where, when you want help, than this are really the replies you would have
to give.

Cor
 

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