Find by ID:
Go
[Log in | Register]
Home
Support Center Home
Categories (Beta)
Report Issue
Report a Bug
Make a Suggestion
Ask a Question
Security
Log in
Register
Forgot Password
Support Center Stats

Issue Reports
Total: 43360
Active: 398
Processed: 42962

Suggestions
Total: 17801
Active: 506
Processed: 17295

Questions
Total: 98464
Active: 94
Processed: 98370

1851 Knowledge Base Articles

557 Code Central Examples

Powered by Developer Express AJAX-Enabled ASP.NET components

This website is powered by Developer Express ASP.NET technologies including the ASPxMenu, ASPxNavBar, ASPxTabControl, ASPxSiteMapControl, ASPxPopupControl and the ASPxGridView and Editors Suite.
Database connectivity is via eXpressPersistent Objects.

Knowledge Base Article

Strange problems when Application.EnableVisualStyles is used

Article ID: A1000
Product Group: .NET
Product: n/a
Version(s):
Updated: 13 Dec 2004
Categories: n/a

Description

There may be different symptoms of this problem. For example:

I.
We are getting an occasional InteropServices.SEHException when dragging a DockWindow into a new position. It does not seem to be related to our application.

II.
If I have visual styles (XP styles) enabled in the application, the images for the toolbar buttons all go away.

Solution

The problem is caused by the Application.EnableVisualStyles method. It is described in detail in the following article:
http://weblogs.asp.net/rprabhu/archive/2003/09/28/56540.aspx

To make a long story short, you should call the DoEvents method after EnableVisualStyles as shown below.

[VB.NET]

Application.EnableVisualStyles()
Application.DoEvents() ' <<<< NEW LINE



Do you have any comments? We are eager to hear them!

How would you rate the quality of this content?

Average rating: 9 out of 9
1 people have rated this page
 
 
 
1
2
3
4
5
6
7
8
9
 
Post Your Vote (Login Required)
If you need any clarification with regards to the contents of this article, please don't hesitate to contact our Support Team.