Inheriting Windows Forms with Visual C# .NET
- Details
- Category: Beginning
- Published on Tuesday, 23 November 2010 20:57
- Hits: 383
Start new Windows Forms Application, for example, name it MyInheritance.
In solution explorer right clink on MyInheritance, like on picture:
Then, in project properties under Output type choose Console Application like on picture:
Save it. Put a button on a form (add form if it doesn't exist), build project.
Then, to test it, go to the File -> Add -> New project... Then choose Windows Forms Application, in the solution explorer right click on References, go to the project tab and choose MyInheritance, then right click on this new project -> Add -> New item ->Windows Forms -> Inherited Form -> Ok and this is it.
If you want to change a component in your inhertited form, then choose property Modifiers from MyInheritance and change it to Public.
Taken from here.
Unsafe code may only appear if compiling with /unsafe
- Details
- Category: Beginning
- Published on Saturday, 16 August 2008 22:42
- Hits: 1273
In VS.NET go to the project property page and in configuration properties>build set Allow Unsafe Code Blocks to True.
Taken from here.

