WinForms: How do I simulate button behavior on an image?

Posted by Cheeso on Stack Overflow See other posts from Stack Overflow or by Cheeso
Published on 2010-04-16T15:10:42Z Indexed on 2010/04/16 15:13 UTC
Read the original article Hit count: 368

Filed under:
|
|

I have an extension of the winforms TabControl, it's draws an X on each tab to allow the user to close the tab.

alt text

How can I similate button look&feel on that image? It's not a button, it's not even an image control. It's just been drawn there.

Is there a way to draw an inset border on MouseDown and Raised on MouseUp? Would I be better off generating another image, for the "inset" phase?

anyone done this before?


Related: Simulate Winforms Button Click Animation
But this question is different because he actually has a PictureBox control. I don't.

© Stack Overflow or respective owner

Related posts about winforms

Related posts about .NET