Results 1 to 3 of 3

Thread: How to remove border from button?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Question How to remove border from button?

    Hello,

    I have the command button set to flat which I need. Is there any way to hide the border? Or better yet can the border be hidden until the mouse is over it? I set it to flat so it will be transparent over a ribbon bar control I use.

    Thanks,
    Warren

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,052

    Re: How to remove border from button?

    Right above FlatStyle is FlatAppearance.
    Set border width to 0

    Perhaps if you want an easy rollover indication, but still see what is underneath, set the FlatAppearance.MouseOverBackColor to a color with a low Alpha value, i.e. Button1.FlatAppearance.MouseOverBackColor = Color.FromArgb(40,Color.Gray)
    Last edited by passel; Jan 15th, 2014 at 01:02 PM.

  3. #3
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    9,624

    Re: How to remove border from button?

    To further what passel suggested, set the border width to 1 in the button's MouseEnter event and then reset it back to 0 in the button's MouseLeave event. This will hide it when the mouse isn't over the button.

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