manifest in Assembly einbetten!?
-
Hí Volks!
Wie kann man ein manifest-File (für die Anwendung von Windows XP-Themes auf Common Controls in eine C# Assembly einbetten?
Hab' die MSDN schon durchforstet, aber nur folgende Info gefunden:
MSDN: Windows XP Technical Articles schrieb:
To create a manifest and enable your application to use visual styles link to ComCtl32.lib and call InitCommonControls.
Add a file called YourApp.exe.manifest to your source tree that has the following XML format:<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>Add the manifest to your application's resource file as follows:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"Note When you add the previous entry to the resource you must format it on one line. Alternatively, you can place the XML manifest file in the same directory as your application's executable file. The operating system will load the manifest from the file system first, and then check the resource section of the executable. The file system version takes precedence.
Und genau bei
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"
liegt mein problem:
Wie soll ich diese Zeile in einem .resx -File umsetzen?
Wenn ich die *.exe.manifest in das selbe Verzeichnis wie meine *.exe lege funktionierts.THXIA, Swordfish
P.S.
Ich hasse es, in der MSDN folgendes zu lesen *würg*:
This is preliminary documentation and is subject to change.
-
Servus,
möchtest du deine Anwendung im XP Style haben? Dann geht das auch einfacher:
[STAThread] static void Main() { Application.EnableVisualStyles(); Application.DoEvents(); Application.Run(new Form_DeineForm()); }
Einfach Application.EnableVisualStyles und ein DoEvents einfügen. Das ist einfacher....
Hellsgore
-
Ist Application.EnableVisualStyles() in .Net 1.0 schon implementiert?
Funzt bei mir ned.
-
Servus,
ne, erst ab .Net 1.1.......
Hellsgore
-
F*ck! [Kurz gesprochen, ähnlich Homer Simpson's 'Nein!']
Alo: Problem besteht weiterhin...
Höre ich die Köpfe rauchen?
-
Servus,
gucke mal hier ist was lecka, leckaaa, lecka, lecka, lecka....
http://www.codeproject.com/dotnet/ManifestInjection.asp
Viel Spaß
Hellsgore