[Mono-winforms-list] ControlPaint.DrawReversibleFrame not working?

Jurek Bartuszek koxta at koxta.net
Tue May 22 11:35:58 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've noticed that System.Windows.Forms.ControlPaint.DrawReversibleFrame
has recently been implemented. I've built and run the following code:

using System.Windows.Forms;
using System.Drawing;

namespace Testing
{
        public class MainForm : Form
        {
                public MainForm()
                {
                        this.Text = "test";
                        this.Width = 500;
                        this.Height = 500;
                }

                protected override void OnPaint(PaintEventArgs e)
                {
                        Rectangle r = this.RectangleToScreen(this.Bounds);
			r.Offset(50, 50);
                        ControlPaint.DrawReversibleFrame(r, Color.Black,
FrameStyle.Thick);
                }
        }

        public static class Entry
        {
                public static void Main(string[] args)
                {
                        Application.Run(new MainForm());
                }
        }
}

I know that OnPaint is not the best place to draw this frame, but that's
solely for testing purposes and the result is that the frame is not
being drawn at all. Any ideas what might be wrong?

Best regards,
Jurek Bartuszek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGUw3e6l8uJkeTVlMRAleHAJ9BNNLZigG0EugStHVJYnYlr66e7wCgwBFx
o1LToKNdYNHYDKoFBV29e1Q=
=XXZI
-----END PGP SIGNATURE-----


More information about the Mono-winforms-list mailing list