質問

Okay, so some of you may be familiar with the Krypton Toolkit by Component Factory. If not, check it out here.

Anyways, you can change the form style completely using this toolkit by opening the designer code for your form and changing this line:

Inherits System.Windows.Forms.Form

To this:

Inherits ComponentFactory.Krypton.Toolkit.KryptonForm

That is Visual Basic though. I would like to achieve this using C#.

役に立ちましたか?

解決

In the form's code-behind file instead of this:

public partial class Form1 : Form

type this:

public partial class Form1 : ComponentFactory.Krypton.Toolkit.KryptonForm

Note, that this isn't a changing of form's style, this is changing of base class. To open code-behind, you should press F7 in designer by default.

他のヒント

in C# you have 2 cs files for your form.

Say your form is called Form1, you'll have to go to the file Form1.cs and change this line:

public partial class Form1 : Form

to

public partial class Form1 : ComponentFactory.Krypton.Toolkit.KryptonForm

that should do the work

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top