0

I'm making C# windows application ("Windows Forms Application") with default components, but I need to change default look of the form and all items on it (buttons, etc.) from classic windows style, to custom. How can I achieve it?

For example make buttons round, add transparency to some objects, make other objects with different shape, and so on.

It doesn't have to be customizable, but I just need to change it from default to something else. Maybe there's some components or something else that I can use? Or maybe there's additional GUI library that I can download and add to the project?

TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130
NewProger
  • 2,945
  • 9
  • 40
  • 58

2 Answers2

2

You didn't provide us with many details on how you want to customize the form.

You can change colors used on the form by setting the BackColor and ForeColor properties.

You can also apply background image to the form and use the TransparencyKey property in order to create a form with an irregular shape. More information about this method can be found here: http://msdn.microsoft.com/en-us/library/6k15y9et.aspx

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Lukasz M
  • 5,635
  • 2
  • 22
  • 29
  • I'm afraid that's not it. I'm sorry that I didn't gave enough information from the start. I edited my question. – NewProger Jul 17 '11 at 11:22
  • To change the shape of a control, you can use a background image that defines the shape and the look and **TransparencyKey** to define a color that should be transparent (see the link in this answer). Creating custom controls deriving from the default ones can be probably a good solution in this case. To control the transparency for the form, you can use **Opacity** property. – Lukasz M Jul 17 '11 at 11:26
  • So I can set up a transparency key and then use custom images with that color on objects on the form to chenge its shape? – NewProger Jul 17 '11 at 11:40
  • Suppose you want to create a circullar form in a blue color. If you want to use this method, you have to create a bitmap with a blue circle (that defines the look of the visible part) and pink background (that fills the part that should be invisible). Then you use this as a background image and set **TranparencyKey** to the pink color. It's quite ok to use this for a form, however, as mentioned in another answer, it can be really time consuming to create a nice looking control this way. You can start by looking for an existing controls. See the link posted by Dennis Biondic. – Lukasz M Jul 17 '11 at 11:50
  • For for form I understand, but I primarily needed it for components on the form... I guess I have to use custom controls... – NewProger Jul 17 '11 at 11:53
  • Yes, by creating your own custom controls you can define the look and behaviour by yourself and customize it completely. This is, however, time consuming, so consider looking for ready and free controls first if it's acceptable in your case. – Lukasz M Jul 17 '11 at 12:03
1

Doing this manually and trying to have something looking nice takes waaay too much time. For start, look at this thread:

Best Free Controls for .NET

Community
  • 1
  • 1
Denis Biondic
  • 7,943
  • 5
  • 48
  • 79