Hoping for a simple solution

et_

Newcomer
Joined
Feb 16, 2007
Messages
15
I would like to create a custom Graphical interface class that i can implement into any project in the future. Similar to the windows forms, but different shapes. What is the best way to go about this?

ANything will help even google search strings...

Thanks
 
Using the built in forms implementation (or wpf if running on .Net 3 or higher) will save you an awful lot of work ;)

You could simply create a form with the relevant design / shape and inherit your own forms from this.

If you are looking at creating non-rectangular forms then you can do some odd things with classes such as GraphicsPath - create a form and throw a few controls on it and then paste this into the Load event to see what I mean
C#:
private void Form1_Load(object sender, EventArgs e)
        {
            GraphicsPath path = new GraphicsPath();
            Region rgn;

            path.AddEllipse(50, 50, 200, 200);
            path.AddPie(75, 75, 300, 300, 23, 110);
            path.AddRectangle(new Rectangle(0, 0, 150, 50));
            rgn = new Region(path);

            this.Region = rgn;
            path.Dispose();
        }
 
Use WPF...but here's another library if that's not an option

Here's a library I found a few years ago. I don't remember where I found it and I haven't actually had time to play with it or use it but it might give you some ideas or something on which to build new functionality. It's called RegionMaster and it allows you to create graphical regions in your forms with some pretty cool effects.

Of course, all of this is now moot with WPF, but it's attached if you want to take a look.
 

Attachments

Back
Top