We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Non-Clickable Button (Use button only as a label)

Thread ID:

Created:

Updated:

Platform:

Replies:

63708 Jul 8,2007 06:41 PM Jul 8,2007 08:25 PM Windows Forms 1
loading
Tags: Tools
Alan Read
Asked On July 8, 2007 06:41 PM

Hello,

What would I need to override to make a button non-clickable? Basically I just want to use the button for its office 2007 styles.

The attached image will better clarify how I want to use the button..I just want it to be a static label.

I know I have to override the MouseHover and MouseDown events but what code would I put it so that nothing is registered etc.

Thanks

buttonaslabel.zip

Alan Read
Replied On July 8, 2007 08:25 PM

I figured it out.

At first I was going to create a custom control from buttonAdv but then I figured out that if I set the following things:

SuspendMouseState();
TabStop = false
keepFocusRectangle = false;

It works out like I want it too.

Thanks

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;