Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2005

Tip: Looking for answers? Try searching our database.

Whats new in SP1 of framework ??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Saurabh - 05 May 2005 17:49 GMT
Hello All,

Some days back I had posted a message saying I am getting symptoms like the
'EnableVisualStyles' bug mentioned at lots of places. Most of the time the
application just crashes, and I can't even get a proper stack trace or error
information. That post is pasted below, but currently, when I got a clean
machine and did not install the service pack 1 of the .NET framework 1.1,
the wierd crashes seem to have disappeared. I wonder what it could be....

Any pointers are most welcome

TIA,

--Saurabh
---------------------ORIGINAL PROBLEM -------------------------------
I have a .NET application running on Windows XP. I have quite a few forms,
some modal and some modeless. Once in a while we get a wierd exception in
the application and most of the time the code is transferred to the top
level 'ThreadExceptionEventHandler'. It is difficult to get the information
on actual exception. Most of the time it seems to say "External component
has thrown an exception' and the source of the exception object is 'System'

Doing a bit of searching on the internet, I came across the known bug in
EnableVisualStyles( ). I do not call the Application.EnableVisualStyles at
all. but I do call Application.DoEvents (this was suggested as a fix
somewhere) I tried looking for the comctl32.dll. In the System32 folder the
dll has version 5.82. One of the articles on the internet said, XP uses 6.0
by default. Where would this dll be?

I do get rounded corners for my form's title bar, does this mean that my
application is using visual style? If yes where is it getting set? Is it the
default under Windows XP (SP2)?

Can somebody direct me to information which will lead to better
understanding of visual styles and the related bug. I don't even know
whether what I am facing is the same bug or not
------------------------------------------------------------------------
Frank Loizzi - 06 May 2005 03:09 GMT
Am Thu, 5 May 2005 17:49:48 +0100 schrieb Saurabh:

> Some days back I had posted a message saying I am getting symptoms like the
> 'EnableVisualStyles' bug mentioned at lots of places. Most of the time the
[quoted text clipped - 4 lines]
>
> Any pointers are most welcome

That's strange. I had similar problems but the solution was the
installation of the ServicePack 1 for .NET 1.1. After that I had no more
crashes of this difficult traceable error.

> --Saurabh
> ---------------------ORIGINAL PROBLEM -------------------------------
[quoted text clipped - 4 lines]
> on actual exception. Most of the time it seems to say "External component
> has thrown an exception' and the source of the exception object is 'System'

Yes, that's the pattern. :(

It costs me hours of debbuging sessions.

> Doing a bit of searching on the internet, I came across the known bug in
> EnableVisualStyles( ). I do not call the Application.EnableVisualStyles at
> all. but I do call Application.DoEvents (this was suggested as a fix
> somewhere) I tried looking for the comctl32.dll. In the System32 folder the
> dll has version 5.82. One of the articles on the internet said, XP uses 6.0
> by default. Where would this dll be?

Yes there are comctl32.dll's in version 6.xx. A short search on my systems
(Windows 2003 Server and Windows XP Professional) shows me 4 files on W2003
and 3 files on WXPP. Version numbers are: 5.82.3790.0, 5.82.3790.0,
6.0.2600.0, 6.0.3790.0 and 5.82.2900.2180, 6.0.2600.0, 6.0.2900.2180. These
are numbers from the german versions of the OS.

> I do get rounded corners for my form's title bar, does this mean that my
> application is using visual style? If yes where is it getting set? Is it the
> default under Windows XP (SP2)?

You use visual styles when you enable this command before
Application.Run(new app): Application.EnableVisualStyles();

> Can somebody direct me to information which will lead to better
> understanding of visual styles and the related bug. I don't even know
> whether what I am facing is the same bug or not
> ------------------------------------------------------------------------

Yes it is the famous EnableVisualStyles bug. Very annoying. Too much
wasting time. In fact you don't use VisualStyles you use maybe a custom
control which use routines from the GDI+ and you get the same behavior like
using VisualStyles.

Greetings from germany...

Frank Loizzi
Saurabh - 06 May 2005 10:15 GMT
I am sure I do not use visual styles. My application is a mix of .NET and
Win32 stuff though.
I guess the fix in SP1 is there only if you use visual styles ;)

I'll have to keep debugging, I can't see any reliable alternative.

If anybody knows anything, please please I am eager to know.

--Saurabh

> Am Thu, 5 May 2005 17:49:48 +0100 schrieb Saurabh:
>
[quoted text clipped - 70 lines]
>
> Frank Loizzi

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.