Computers && Coding == Art

PC Affinity [email protected]
Menu
  • Home
  • Downloads
  • Projects
  • About Me

RoundedButtons

Download latest version from Github

Simple tool to help create rounded buttons on your WinForms.

Very customizable.


Need more pizazz in your WinForm application? I got you. Want your Forms to pop? I got you. Try this easy to use RoundedButtons resource. It’ll change your life.


To Use

I’ve included color and line styles for Normal, Disabled, Highlighted, and Clicked buttons. Everything can be set when creating a new RoundedButtons object. Then just use that object to paint the buttons and subscribe to the events automatically.


Before
After

Single Button Example:

RoundedButtons roundedButtons = new RoundedButtons()
{
    Btn_CornerRadius = 5,
    Btn_ShadowWidth = ShadowSize.Thick
};
  
roundedButtons.PaintButton(button1);

Multi-Button Example:

RoundedButtons roundedButtons2 = new RoundedButtons();

foreach (object o in panel1.Controls)
{
    if (o is Button b)
    {
        roundedButtons2.PaintButton(b);
    }
}

Note: Buttons painted with RoundedButtons have no set Text. You can still set the Button text normally, but you must retrieve the Button text from the RoundedButtons object.

This limitation was to work around a Button Painting issue with background colors and transparency.

RoundedButtons roundedButtons = new RoundedButtons();
roundedButtons.PaintButton(button1);

button1.Text = "OK";

if (MyRoundedButtons.GetButtonText(b) == "OK") { this.Close(); }

Returning Button to normal:

roundedButtons.Dispose();



Please feel free to view the source code over at GitHub. Completely available. Let me know if you have any questions or concerns. And please share with your friends!



Share this:

  • Twitter
  • Facebook
  • SMS
  • Email

Like this:

Like Loading...

Leave a Reply Cancel reply

My LinkedIn Profile


'Derrick Ducote'

Tags

API ASP.NET C# Clipboard Cycler Cloudflare Coding ColorFadeCalculator ConsoleWriter DLL Downloads First FMOL Assistant FMOL Marquee FP Time Tracker Gaming Hotkey Commands HTML Learning MagicHat MagicWheel Mouse Commands NGINX Other Personal PHP Picket Projects RegistryCommands RoundedButtons Server Site Information Synology Toolkit Cleanup

Categories

  • Apps
  • Coding
  • Configurations
  • Other
  • PHP
  • Server
  • Site Information

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

PC Affinity 2023 . Powered by WordPress

%d bloggers like this: