Flatstyle on System results in empty controls

R

Robert van Weersch

We have this weird problem with VS.NET 2003. Until recently, we
programmed winforms with EnableVisualStyles and for the controls the
property Flatstyle on System. This always worked fine: nice new fluffy
XP controls under Windows XP and "old style" controls under Windows 2000.

Two weeks ago our sysadmin installed Office 2003 on all developer PC's
and the troubles started: if a control (e.g. a button) has Flatstyle on
System, the text of the control is empty if we don't call
EnableVisualStyles. If we call EnableVisualStyles, then the text
actually does appear. Weird, but we can live with that. Worse is that
even the MessageBox function is affected by this strange bug: the text
is empty, the button text is empty, and there's no visual style applied.
This renders the MessageBox completely useless.
If the compiled program is used on that same workstation on an image
with Office 2000 (in stead of 2003), it all works fine.

The problem occurs within all VS.NET languages. Strangely, we use .NET
software from other companies, and that software doesn't suffer from
this bug.

We use Windows XP Prof, fully patched, Visual Studio .NET 2003
Enterprise Developer, and Office 2003, fully patched.

We'd really appreciate any help!


Robert van Weersch,
Senior Software Engineer
Circle Software Group
 
H

Herfried K. Wagner [MVP]

Robert van Weersch said:
We have this weird problem with VS.NET 2003. Until
recently, we programmed winforms with EnableVisualStyles
and for the controls the property Flatstyle on System. This
always worked fine: nice new fluffy XP controls under Windows
XP and "old style" controls under Windows 2000.

Two weeks ago our sysadmin installed Office 2003 on all
developer PC's and the troubles started: if a control (e.g.
a button) has Flatstyle on System, the text of the control is
empty if we don't call EnableVisualStyles. If we call
EnableVisualStyles, then the text actually does appear.
Weird, but we can live with that. Worse is that even the MessageBox
function is affected by this strange
bug: the text is empty, the button text is empty

I assume you are using a virus scanner like McAfee AntiVirus 8. Turning off
buffer overflow protection will solve the problem.
 
R

Robert van Weersch

Thanks for your rapid reply! This actually solves the problem! Our
sysadmin also updated our McAfee to a newer version.

Do you have an explanation for this strange behaviour? I don't quite get
why a buffer overflow protection can influence the behavior of the
rendering of controls?

Regards,
Robert
 
G

Guest

I also have this problem and just found this solution... and it works. I also
find this strange :)

But, is this behavior only hapenning on the developer's PC? Does this means
that we'll have to tell our clients to turn off their buffer overflow
protection so they can see our message boxes?? I doesn't make sense...

Thanks
François
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top