How to inherit from Office 2007 Forms
Here are the steps to follow to inherit from Office style forms included with DotNetBar. This applies to Visual Basic.
1. Make sure that you have reference to DevComponents.DotNetBar2.dll in your project. Do not reference both DevComponents.DotNetBar.dll and DevComponents.DotNetBar2.dll.
DevComponents.DotNetBar2.dll is .NET Framework 2.0 and later native build which should be used in Visual Studio.NET 2005 and all later releases. Double-Click My Project in Solution Explorer and select References tab to check that.
2. Click Show All Files button in Solution Explorer
3. Expand Form node and Double-Click the Form1.Designer.vb to open the designer file
4. Change Form inheritance from Inherits System.Windows.Forms.Form to
a. Inherits DevComponents.DotNetBar.OfficeForm if you want standard form without ribbon control
b. Inherits DevComponents.DotNetBar.RibbonForm if you want to use Ribbon Control with start button on that form. Usually there is only one form in application that inherits from RibbonForm
5. Save and run the application to see the result.
Here is how to do same thing using C#.
Reference DotNetBar Assembly
Right-click References in VS.NET Solution Explorer and choose Add Reference…
Select DotNetBar assembly
Your project now has reference to DotNetBar
Change class form is inheriting from
Select Form and replace it with DevComponents.DotNetBar.OfficeForm or DevComponents.DotNetBar.RibbonForm
Related posts: