Link to home
Start Free TrialLog in
Avatar of sakuya_su
sakuya_su

asked on

strange VB Manifest problem

Hi,

Im trying to use a manifest file so my controls looks like XP style, now i have the following code:
Public Function InitCommonControlsVB() As Boolean
   On Error Resume Next
   Dim iccex As tagInitCommonControlsEx
   ' Ensure CC available:
   With iccex
       .lngSize = LenB(iccex)
       .lngICC = ICC_USEREX_CLASSES
   End With
   InitCommonControlsEx iccex
   InitCommonControlsVB = (Err.Number = 0)
   On Error GoTo 0
End Function

Public Sub Main()

   InitCommonControlsVB
   
   Load frm_Main
   frm_Main.Show

End Sub

and the manifest file is:
<?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.YourAppName"
        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>


now the problem, my controls looks like:
http://genesis-kiith.no-ip.com/why.gif

you see the cancel button looks very good a but there is the funny black border around the other 2 buttons? (Excuss the bad image quality)

Now i have tried different XP Styles, everyone of them looks like that

there is nothing different between the 3 buttons apart from the font, they were copys of each other (I tried none copies too)

Anyone have an idea?

thanks in advanced
Avatar of Alkali_Guy
Alkali_Guy

All I can think of is that your buttons' BackColor properties might not be set to Button Face.
Avatar of sakuya_su

ASKER

they are, unfortunatly
ASKER CERTIFIED SOLUTION
Avatar of Stephen Manderson
Stephen Manderson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial