windows xp stylee buttons?

  • Thread starter Thread starter Stephen Remde
  • Start date Start date
the buttons on mine are not xp style by default, neither are the frames -
dont know what else is different on xp!
i am running xp pro with sp1 and further updates.
puzzling?
 
Hmm, that is puzzling. Obviously I'm wrong about the default, but we've
deployed 300+ of our apps on both XP Home and XP Pro Apps and they all
switch accordingly.

I'll look around some more and see if I can find anything...sorry about the
bum tip, I just took it for granted that all XP systems/SPs etc would have
the same behavior.

I'll get back shortly if I can find anything.

Cheers,

Bill
 
Oddly, they will not be by default.

What you need to do is change the buttons 'flatstyle' property to be system,
not standard as they probably are

Then the buttons will be XP style then.

If you using VS 2003, then search on XP Theme the help section filtered to
'visual basic' and you will see the doco on how do do other controls as
well.
 
Thanks for the tip, that makes sense. We always use System, so when our
stuff showed up in XP format by default on the XP boxes, I just assumed
(incorrectly) that it was the default behavior.

Thanks again,

Bill
 
Oddly, they will not be by default.

What you need to do is change the buttons 'flatstyle' property to be system,
not standard as they probably are

Then the buttons will be XP style then.


Nope... you still need to make a call to Application.EnableVisualStyles() in the
application. I just tried it here. Just changing the button's FlatStyle
property did not do the trick.
 
Kerry said:
Nope... you still need to make a call to
Application.EnableVisualStyles() in the application. I just tried it
here. Just changing the button's FlatStyle property did not do the
trick.

Don't use that! I've found Application.EnableVisualStyles to be very buggy
in .Net Framework 1.1. Instead, create a manifest to reference comctl32.dll
version 6. Just create a text file with the following contents:

-----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
 
Don't use that! I've found Application.EnableVisualStyles to be very buggy
in .Net Framework 1.1. Instead, create a manifest to reference comctl32.dll



Thanks for the post. Just for the record, what kind of issues have you found
when using Application.EnableVisualStyles?
 
hmm, i have no function Application.EnableVisualStyles() ? is this framework
1.1? i have it installed, but my vs came with 1.0 - do i need to update
visual studios to use it?

Stephen
 
hmm, i have no function Application.EnableVisualStyles() ? is this framework
1.1? i have it installed, but my vs came with 1.0 - do i need to update
visual studios to use it?


I am using Visual Studio .NET 2003. I do not know if this is specific to v1.1
of the Framework or not, though. Sounds like it may be.
 
William Ryan said:
The buttons will have the XP look and feel by default if run under XP

Only the nonclient area of the window will have the XP look by default.

-- Alan
 
Back
Top