Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

VB.NET 2003 Visual styles

Back to Forum: Tech Off
  • User profile image
    RedShift

    Hi everyone,

    I'm having a problem since yesterday. I have the following code in my sub main:

    Application.EnableVisualStyles()
    Application.DoEvents()
    Application.Run(objCirkel)

    So far so good, I've set flatstyle to System on all controls that support it, but, it doesn't work anymore! And it stopped working right after I ran Windows Update. I checked the updates, this was installed:
    * Microsoft .NET Framework 1.1 Service Pack 1
    * Security Update for Microsoft .NET Framework, Version 1.1 Service Pack 1 (KB886903)

    Has anyone got the same problems as me? This only appears to be happening on programs I compile now, those that were compiled before the update was installed, still have the visual styles applied to them.

  • User profile image
    Sven Groot

    Although I haven't seen this particular issue, there are many issues with Application.EnableVisualStyles(). I've found it easier to just include a manifest file and forget about EnableVisualStyles.

  • User profile image
    RedShift

    Sven Groot wrote:
    Although I haven't seen this particular issue, there are many issues with Application.EnableVisualStyles(). I've found it easier to just include a manifest file and forget about EnableVisualStyles.


    Can you show me an example on how to do that (include a manifest file)? What exactly is the purpose of a manifest file?

  • User profile image
    John Galt

    I was the guy that first realized that if you did an Application.DoEvents() that you might actually get visual styles to work the way it was intended in Vs.net 2003.

    unfortunately it has all kinds of bugs and relies on timing, thus it doens't work all of the time and is affected by all kinds of variables that you can't control, and BTW, you will definately have problems with ImageLists (that have other problems too, but this makes it all worse) so there is no point in using EnableVisualStyles.

    So use a manifest file and be done with it, EnableVisualStyles is pointless until you go to Vs.net 2005 in a month...

    Here's the link that will help you with a manifest:

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

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.