How to: Create a Windows Forms Control That Takes Advantage of Design-Time Features
The following example illustrates how to create a custom control and an associated custom designer. When this library is built, you can build custom MarqueeControl implementations that run on a form.
There is extensive support for this task in Visual Studio.
Create a Windows Control Library project to host these files. Name the project "MarqueeControlLibrary".
Your MarqueeControlLibrary project will require references to the System.Design, System.Drawing, and System.Windows.Forms assemblies.
Note
|
|---|
|
You must add a reference to the design-time assembly, System.Design.dll. This assembly is not included in the .NET Framework 4 Client Profile. To add a reference to System.Design.dll, you must change the project's Target Framework to .NET Framework 4. |
Note