Results 1 to 5 of 5

Thread: How to change the color and appearance of command buttons

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    2

    How to change the color and appearance of command buttons

    I am a newbee so please consider me. There is an image on my MS access form.On clicking over that image the color of that particular part should change and some data should enter into the table. I want to use transparent command buttons to do that. These buttons should be flat in appearance and should have a different color so they dont exactly look like command buttons.I want to do that by using the FillBackColor and Special effect on the toolbar but those are disabled for command buttons.Do I have to set any property to enable them(like in Vb we have the Style property set to Graphical to manipulate with pictures)? Please help!

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

    Re: How to change the color and appearance of command buttons

    Welcome to the Forums.

    It sounds like your not using a control that is best for the job. Why are you trying to change the image in
    a command button? Its not possible to get the location of a click on a commandbutton. Why not use a
    different control like a picturebox?
    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
    New Member
    Join Date
    Mar 2005
    Posts
    2

    Re: How to change the color and appearance of command buttons

    I already have an image over which I am placing a number of transparent command buttons. I dont need the location of the image, I just need to change the color of that particular part on click and get back to the original image if clicked again. My form is in MS Access and there is no picture box tool in that. Please help..

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

    Re: How to change the color and appearance of command buttons

    Sorry about that. You can use the image control. When the user click the image you can change the
    picture. Then when they click it again you can change it back.

    I'm not quite sure what your trying to do but if its change an image between clicks, what I just wrote would be the way.
    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
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: How to change the color and appearance of command buttons

    If it's just colour backgrounds, perhaps labels would be best?
    VB/VBA (excel forms) has click events for labels, then you can reset the colour background, add a single thickness and use the 3d options via code...

    Not sure that you can change just a little bit of an image, depends on the image itself.
    Perhaps if it is not completely user defined, you could have lots of little images and when you click on one it replaces it with the opposite colour/picture...?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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