Any way to redesign a button?

tetra

Member
Joined
Jan 11, 2008
Messages
12
Programming Experience
3-5
Hi, I'm looking to make a very nice GUI for my application. I was wondering if there is a way to redesign a button or another component. For example, I'd like to make a round button instead of the conventional rectangle. And I notice the border is automatically put in when I put an image over the button. There is very limited design options.

Thanks.
 
create a new user control and insert code something like this:

VB.NET:
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)

Dim g As Graphics = e.Graphics

g.fillellipse(*I cant remember the parameters, brush and bounds or something*)

End sub

that should give you a circle. As it inherits usercontrol properties, it has an onclick event. You may be able to inherit from a button control, I have not tried this and I do not know what options you have with doing that but it might be better.

you may wish to add some code to the mouseover event to change the image slightly, like in a standard button (the orange shadow)

Hope that helps
 
With combination custom graphics/images depending on Mouse event and setting Region property you can do it.
 
Do any of you guys have knowledge on how to add animation on a button? Such as when you go over it it highlights or something like this?
 
You mean do something on MouseEnter and MouseLeave events?
 
I actually tried using those events, but there is a big delay when I go inside. It really doesn't look professional, there's a slight lag. I used the visible and nonvisible properties to try it. Once I get that working well, my next question was going to see if it was possible that once I click a button, it caves in like a Windows button. Is this possible?
 
That is the MouseDown and MouseUp events. There is no delay that I'm aware of. What "visible and nonvisible properties" means I don't know.
 
Back
Top