.NET Framework - Remove border from popup button More options

Asked By Eran.Yass on 07-Mar-07 11:30 AM
Hi all,

Originally, I posted this post in
I was offered to try get answer here.

I am writing my app in C#.

I have button which its flatstyle is popup. The problem is that it
border when user doesn't
move the mouse on the button. How can I remove the border that only
when the user moves the mouse cursor on that button, it sets border
it looks like 3d?

The problem is that the popup button doesn't look popup in its current


ClayB replied on 07-Mar-07 01:29 PM
I may be missing the point of your question but if you do not want to
see a border until you move the mouse over the button, you might try
using a panel instead of a button. You could start out with no border
and then show/hide the border in the panel's MouseEnter and MouseLeave

this.panel1.BorderStyle = BorderStyle.None;
this.panel1.MouseEnter += new
this.panel1.MouseLeave += new

void panel1_MouseLeave(object sender, EventArgs e)
this.panel1.BorderStyle = BorderStyle.None;

void panel1_MouseEnter(object sender, EventArgs e)
this.panel1.BorderStyle = BorderStyle.Fixed3D;

Clay Burch
Syncfusion, Inc.
Eran.Yass replied on 07-Mar-07 04:50 PM
Hello Clay and thanks for the reply.
I liked what you suggested. The problem with this border style is that
it looks sunken 3d instead of raised.