Results 1 to 9 of 9

Thread: Re: Button Help [Resolved]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Resolved Re: Button Help [Resolved]

    I added WinXP button style to my app, and now I can't change the button text color, it is always black, because I had to set flat style to "System" (otherwise I won't have the XP style). Is there a way to change it?
    Last edited by Nebo_vb; Jun 6th, 2005 at 03:43 AM. Reason: Resolved
    It has been said that something as
    small as the flutter of a butterfly's
    wing can ultimately cause a typhoon
    halfway around the world...


  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Button Help

    When the button style is set to System in order to obtain the VisualStyles effect, you may need to change the VisualStyle Text
    for the button to a user defined color. The VS are drawn on a second layer on top of the control (button). So it may look like the text is not changing
    but underneath the visual stlye it is being drawn in the color you choose. To get around this you probably need to change the Visual Style Text
    effect be interacting directly with the theme.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Re: Button Help

    hmm... Can you please make a screenshot of that VS position? I can't find it.
    It has been said that something as
    small as the flutter of a butterfly's
    wing can ultimately cause a typhoon
    halfway around the world...


  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Button Text Color

    Its not a position so to speak but rather think of the visual styles as a layer that is placed over the controls that are set with a
    Flatstyle of System. Its like skinning a control or form. You cant see it. Its the inner working of VB. Only the visual effect when
    the form is displayed.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Re: Button Text Color

    Ah, I got it... Well, is there a way to change it and if it is, how?
    It has been said that something as
    small as the flutter of a butterfly's
    wing can ultimately cause a typhoon
    halfway around the world...


  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Button Text Color

    See this thread of mine where I am trying to do things like this.

    VisualStyles
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Button Text Color

    I strongly recommend visiting www.skybound.ca and downloading their free VisualStyles component. It fixes almost all the common visual style issues in VS.NET 2003 and allows you to use all the standard .NET controls without changing properties, adding manifests or other fiddly stuff. It involves a couple of lines of code and adding a single component to each form. Everything else is done for you.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Resolved Re: Button Text Color

    I downloaded Skybound's VisualStyles component, and it is really easy to use and does a great job! I have one question. If I need to go trough the following code for each control (As System.Windows.Forms.Control), I think it is not the best solution to write it 100 times if I have 100 controls in the form. How to do it with the for loop or something similar?

    Resolved!

    Nebo
    Last edited by Nebo_vb; Jun 6th, 2005 at 03:44 AM. Reason: Resolved
    It has been said that something as
    small as the flutter of a butterfly's
    wing can ultimately cause a typhoon
    halfway around the world...


  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Button Text Color

    Quote Originally Posted by Nebo_vb
    I downloaded Skybound's VisualStyles component, and it is really easy to use and does a great job! I have one question. If I need to go trough the following code for each control (As System.Windows.Forms.Control), I think it is not the best solution to write it 100 times if I have 100 controls in the form. How to do it with the for loop or something similar?

    Resolved!

    Nebo
    I'm not sure what you mean. You should simply be able to add a VisualStyleProvider to each form and all existing controls will support the additional visual style functionality automatically and by default.

    Edit:
    Sorry. Started writing post before your edit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width