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
Visual Basic Classic

Avatar of undefined
Last Comment
Stephen Manderson

8/22/2022 - Mon
Alkali_Guy

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

ASKER
they are, unfortunatly
ASKER CERTIFIED SOLUTION
Stephen Manderson

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Stephen Manderson

Your help has saved me hundreds of hours of internet surfing.
fblack61