Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Application.EnableVisualStyles in 2006 doesn't work

90 views
Skip to first unread message

Patrick

unread,
Jan 16, 2007, 8:36:58 AM1/16/07
to
In my program unit I have:
Application.EnableVisualStyles;

this should enable XP style buttons. In Delphi 2005 it indeed does, but in
2006 it doesn't. I checked FlatStyle=System, all seems fine, but isn't.
Something changed, but what??

Unknown

unread,
Jan 16, 2007, 11:02:43 AM1/16/07
to

There is a bug n the EnableVisualStyles. It is explained here
http://blogs.msdn.com/rprabhu/archive/2003/09/28/56540.aspx
(Somewhere near the bottom)

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com

Patrick

unread,
Jan 16, 2007, 10:49:05 AM1/16/07
to
The problem seems to be .NET 1.1 SP1
Delphi 2005 doesn't install the PS, 2006 does.

How can I solve this problem? (except reinstalling the system without SP1,
also probably systems with SP1 will not see the XP style).

"Patrick" <patrick...@yahoo.es> escribió en el mensaje
news:45ac...@newsgroups.borland.com...

Patrick

unread,
Jan 16, 2007, 11:19:47 AM1/16/07
to
Thanks, now I can solve the problem. Just one thing: In .NET version 1.1 and
version 2.0 will be installed at the same time right? Does that mean that if
I upgrade to .NET 2.0 the problem will not be fixed, because my Delphi
program has been made to work with v1.1 components?


Unknown

unread,
Jan 16, 2007, 2:35:17 PM1/16/07
to

Your code will only run against the .NET 1.1 runtime.
The solution is outlined fairly simply:
Add Application.DoEvents between Application.EnableVisualStyles and
Application.Run.

Patrick

unread,
Jan 16, 2007, 5:25:28 PM1/16/07
to
I did see the solution, but thank you anyways.

I really disagree with Microsoft's policy. If you must have several versions
of .NET installed, they should fix errors in every version.


0 new messages