Results 1 to 13 of 13

Thread: Change Buttons shape etc..

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    139

    Change Buttons shape etc..

    Hi

    I have XP..

    How do i change the shape of the normal command buttons of VB6.. i want to make them like XP has.. any OCX or DLL to be used ?

    Just to make my project look better

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

    Re: Change Buttons shape etc..

    Check out Wokawidget Component Suite in CodeBank. It contains a project called XP Button. You can create oddly shapped buttons with the standard XP theme regardless if you are running XP or not.

    http://vbforums.com/showthread.php?t=328044
    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
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Change Buttons shape etc..

    If you mean enableing XP theme, see this. (Images are still not up. )
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    139

    Re: Change Buttons shape etc..

    @RobDog888 : Excellent stuff.. but i cannot copy the whole code into mine.. looks very complex.. i have to show it as a project and its looking too complicated..

    @iPrank : i didnt understand this.. can u explain.. or probably a project with it.. pics should have been there

  5. #5
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Change Buttons shape etc..

    I meant, when XP theme is enabled, your VB buttons will look like XP buttons.
    http://www.freevbcode.com/ShowCode.asp?ID=3678

    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Change Buttons shape etc..

    The easiest way, and probably a way that would be acceptable to the person reviewing your project, would be to replace the command buttons with image controls and place pictures in the images.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    139

    Re: Change Buttons shape etc..

    @iPrank

    Now thats EXCELLENT!!! works like a charm.. repped for the info... and HACK too..

    Just wanted to know.. can we change the color of forms also to XP theme like.. not much color platelets show in VB6.. and also the color when the mouse is over the button

    also when the prog is not running on XP.. i hope it will not give any error..

  8. #8
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Change Buttons shape etc..

    If you mean the background color of the form, then use the BackColor property.
    It accepts any valid color value.
    VB Code:
    1. Form1.BackColor = &HC86464 ' or any valid  color
    2. ' or
    3. Form1.BackColor = RGB(100, 100, 200)
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    139

    Re: Change Buttons shape etc..

    1) Do u know any place where I can get the color values of all colors?? especially XP color theme

    2) If the prog is not running on XP ( regarding the manifest ).. suppose on 98 or something.. it will not give any error.. right??

    3) Is there any way to put the color same for all the forms the same.. i mean if i dont want to put the same line of code again and again in each form.. is there any way to make all same at once..

    4) Also can u look at this pic ?? can u tell me why does 1 button have edges and 2nd dosent??

    Last edited by khandu; Feb 21st, 2007 at 01:26 PM.

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

    Re: Change Buttons shape etc..

    1. You can get the values out of the property grid.
    2. No it will not error but it will not draw any XP theming at all.
    3. No, you could loop through the Forms collection of your opened forms and set the color. Or manually set the color in the property grid for each form.
    4. Because its in a frame. Its a bug. Place the button in a picturebox and set the box to flat and no border so it cant be seen but the button.
    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

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    139

    Re: Change Buttons shape etc..

    1) The property grid doesn't show all colors.. i guess..

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

    Re: Change Buttons shape etc..

    It shows allot of colors. Can you elaborate more?
    Attached Images Attached Images  
    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

  13. #13
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Change Buttons shape etc..

    You could also put a shape object below your button or whatever and give the appearance of a shape. Might not be what you are looking for however, looks great with textboxes/listboxes etc.

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