Tech Off Thread

5 posts

EnableVisualStyles and SEHException?

Back to Forum: Tech Off
  • User profile image
    Dr Herbie

    Hi folks,

    Has anyone encountered the wierd SEHException when using           

    Application.EnableVisualStyles();
    Application.DoEvents();


    at the start of an app and then using the PropertyGrid control?

    I've Googled and found many threads making the link between these two, but no real solution.

    If I have to use a manifest file instead, will that still cause the error?

    Any additional info would be welcome.

    Dr Herbie

  • User profile image
    Sven Groot

    I'm not so sure about that particular error, but I've found EnableVisualStyles to be very buggy in general. I've had much more luck just using a manifest file.

  • User profile image
    MSRoad​Warrior

    You will probably have better luck using the manifest approach.  There are a number of different issues that arise when using Application.EnableVisualStyles that often aren't seen when using the manifest file. 
    One other nice thing about the manifest approach is that if you have any future problems (and let's hope you don't) you can always just delete the manifest file and you wouldn't have to recompile your application.

  • User profile image
    senthilkumar

    Where are you calling those functions? I've seen this problem go away when I call them in Main, just before Application.Run

  • User profile image
    harumscarum

    We just went through this yesterday. We were getting an error with EnableVisualStyles so we went with the manifest. So far we have not had any problems.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.