Discussion:
Windows Forms Control Library
(too old to reply)
Derek Hart
2009-03-06 00:55:37 UTC
Permalink
I have a vb.net winforms application that I need to allow others to host
inside other winforms applications. I have just learned of the Windows Forms
Control Library. Can I make a control inside the Windows Forms Control
Library that inherits a form from the main winforms project. I simply don't
know the steps inside the control to inherit it properly and show the form.
Morten Wennevik [C# MVP]
2009-03-27 08:10:01 UTC
Permalink
Post by Derek Hart
I have a vb.net winforms application that I need to allow others to host
inside other winforms applications. I have just learned of the Windows Forms
Control Library. Can I make a control inside the Windows Forms Control
Library that inherits a form from the main winforms project. I simply don't
know the steps inside the control to inherit it properly and show the form.
Hi Derek,

If by Windows Forms Control Library you mean the project template in Visual
Studio, that is just a regular library project with a UserControl instead of
a Class file preadded as well as the necessary references to
System.Windows.Forms library.

To use and inherit from any library you simply need to add a reference to
the library.

using System.Windows.Forms;

public class MyButton : Button
{
}

The Button class resides in the System.Windows.Forms.dll so to be able to
inherit from Button you need to add a reference to System.Windows.Forms.
--
Happy Coding!
Morten Wennevik [C# MVP]
dummy ahuja
2010-10-23 16:29:00 UTC
Permalink
Create window forms control library
check this helpful link

http://www.mindstick.com/Articles/d1bc25c6-b686-4423-9cf0-147046d6e39d/
Post by Derek Hart
I have a vb.net winforms application that I need to allow others to host
inside other winforms applications. I have just learned of the Windows Forms
Control Library. Can I make a control inside the Windows Forms Control
Library that inherits a form from the main winforms project. I simply don't
know the steps inside the control to inherit it properly and show the form.
Post by Morten Wennevik [C# MVP]
Hi Derek,
If by Windows Forms Control Library you mean the project template in Visual
Studio, that is just a regular library project with a UserControl instead of
a Class file preadded as well as the necessary references to
System.Windows.Forms library.
To use and inherit from any library you simply need to add a reference to
the library.
using System.Windows.Forms;
public class MyButton : Button
{
}
The Button class resides in the System.Windows.Forms.dll so to be able to
inherit from Button you need to add a reference to System.Windows.Forms.
--
Happy Coding!
Morten Wennevik [C# MVP]
Submitted via EggHeadCafe - Software Developer Portal of Choice
ASP.NET Caching Concepts
http://www.eggheadcafe.com/tutorials/aspnet/78de4d09-b013-48c0-8d4a-bedd68f675f5/aspnet-caching-concepts.aspx
dummy ahuja
2010-10-23 16:38:12 UTC
Permalink
Create window forms control library

check this helpful link



<a href="http://www.mindstick.com/Articles/d1bc25c6-b686-4423-9cf0-147046d6e39d/">Windows Forms Control Library</a>

Submitted via EggHeadCafe - Software Developer Portal of Choice
SharePoint Workflow Custom Input Forms
http://www.eggheadcafe.com/tutorials/aspnet/2a494ffa-c3b0-41e5-9847-80e7cdf3779a/sharepoint-workflow-custom-input-forms.aspx
Loading...