I need you to refer me to a good dll file that I can add to my VS in order to have a round button control, any suggestions?
A:
You'd probably have to create an image with your rounded corners specification, and use it on an image button to achieve what you want.
Tobby
2010-05-24 11:09:46
+3
A:
You can make your own pretty easily, the Region property makes it simple. Add a new class to your project and paste the code shown below. Compile. Drop the new control from the top of the toolbox onto a form.
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
class RoundButton : Button {
protected override void OnResize(EventArgs e) {
using (var path = new GraphicsPath()) {
path.AddEllipse(new Rectangle(2, 2, this.Width - 5, this.Height - 5));
this.Region = new Region(path);
}
base.OnResize(e);
}
}
Hans Passant
2010-05-24 12:12:42
+1
A:
Use WPF if its still early in the project and you can still switch
Johann Strydom
2010-05-24 13:33:41
It's never to late to switch to WPF!
Claus Jørgensen
2010-05-24 13:37:26
A:
I suggest following two DLL files: PresentationCore.dll and PresentationFramework.dll
It's more commonly known as Windows Presentation Foundation (WPF), and can easily be used to make round buttons.
Claus Jørgensen
2010-05-24 13:40:18