Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are themes supported in a form?
Message
 
À
29/12/2004 01:15:11
Chris Bohling
Myers and Stauffer LC
Shawnee, Kansas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00972785
Message ID:
00972897
Vues:
11
This message has been marked as the solution to the initial question of the thread.
I would strongly advise against using EnableVisualStyles as it has some very nasty side-effects, espceially in applications that use multiple threads or ActiveX controls (like the Web browser control).

It's better to use a Manifest file with the same name as the EXE file, but with an .Manifest extension:

WebMonitor.exe
WebMonitor.exe.manifest
<?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="Microsoft.Winweb.WebMonitor"
   type="win32"
/>
<description>West Wind Web Monitor</description>
<dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       processorArchitecture="X86"
       publicKeyToken="6595b64144ccf1df"
       language="*"
     />
   </dependentAssembly>
</dependency>
</assembly>
Note that the names and versions of the assemblies here really don't matter as long as the dependency is in there. In fact you can probably take this file as is and use it. Make sure to store it as UTF-8 encoded text if you paste into notepad.

This provides reliable themes without any side-effects.

+++ Rick ---



>>Can I have a XP theme on a form? Is that supported with VS.NET 2003?
>
>You should look at the Application class, EnableVisualStyles method. See the help topic: ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vbcon/html/vbtskapplyingwindowsxpthemestowindowsformsapplications.htm
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform