There is method Application.EnableVisualStyles to support themes in your .NET windows application. However, when we tried to create logon dialog and show it before activating main form, this method did nothing.
Solution was found here http://blogs.msdn.com/rprabhu/archive/2003/09/28/56540.aspx#280809
The problem was that this method does nothing but set some flags and actual processing happens with windows message processing. If some windows handle were created by this time, it may be to late. Application.DoEvents() method may help.
Actually, I still see that sometimes comboxes (and only comboboxes) are drawn without theme support, ant no pattern was identified yet. This problem is waiting to be solved.
In this link I found one interesting comment about System.Runtime.InteropServices.SEHException. Be aware.
Here I will post problems I and my colleagues met and solutions we found.
Wednesday, February 23, 2005
Application.EnableVisualStyles
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment