|
-
Nov 18th, 2002, 06:48 AM
#1
Thread Starter
Junior Member
XP buttons style in Toolbar
How can I display toolbar's button in XP style?
Actually, if I insert a button in toolbar's collection it appears in old 2000 style...
I have installed VB6 after VB.NET... maybe that VB6 installation overwrite some NET user control's DLL?
-
Nov 18th, 2002, 07:47 AM
#2
yay gay
no it wont ever happen because in vb6 u use activex who are no longer used in .NET
-
Nov 18th, 2002, 09:21 AM
#3
Thread Starter
Junior Member
right...
Ideas about this trouble?
I'm using XP Pro, VS.NET and VB6
Thanks
-
Nov 18th, 2002, 09:47 AM
#4
Member
1. you have to use a manifest-file. this file must be located in the same order where your exe-file is
name of exe-file: test.exe
name of manifest-file: text.exe.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
2. the property flatstyle has to be set to 'system'... you can use the following recursive procedure so you dont have to do this for every element
Public Sub SetFlatStyle(ByVal ctrls As Control.ControlCollection)
Dim c As Control
For Each c In ctrls
If TypeOf c Is ButtonBase Then
CType(c, ButtonBase).FlatStyle = FlatStyle.System
ElseIf TypeOf c Is GroupBox Then
CType(c, GroupBox).FlatStyle = FlatStyle.System
End If
SetFlatStyle(c.Controls)
Next
End Sub
The system must support 'themes'... you can proof this with the following statement:
if osfeature.feature.ispresent(osfeature.themes) then
...
end if
-
Nov 18th, 2002, 10:00 AM
#5
Thread Starter
Junior Member
Thank you esc!
I'll try later...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|