Are ownerdrawn buttons available?
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hi all, I was wondering if there is some way to implement ownerdraw buttons in C#. I've searched around but didn't find anithing. Any idea? Thanks in advance and Kind Regards Severino :confused:
This should give you a base to start from.
using System;
using System.Windows.Forms;namespace Namespace {
public class MyButton : Button {
public MyButton() : base() {
SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true );
}protected override void OnPaint(PaintEventArgs e) { // Draw the button }
}
}HTH, James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978