Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • Administrators
Posted

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

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();
       }

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

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.

RegionMasterControls-nobinaries.zip

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...