| InputPanel Components > InputControlHost |
The InputControlHost makes it possible to embed arbitrary controls into the C1InputPanel. Complete the following steps to add the MonthCalendar control to the input panel:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Public Class MonthCalendarHost
Inherits C1.Win.C1InputPanel.InputControlHost
Public Sub New()
MyBase.New(New System.Windows.Forms.MonthCalendar())
End Sub
End Class
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
public class MonthCalendarHost : C1.Win.C1InputPanel.InputControlHost
{
public MonthCalendarHost()
: base(new System.Windows.Forms.MonthCalendar())
{
}
}
|
|
This will open a dialog box where you should type the class name of our control host, such as "WindowsApplication1. MonthCalendarHost".
The control is added to C1InputPanel.
Next time, when you want to add the MonthCalendarHost component you don't have to type its name. The name of this class can be selected from the drop-down list in the "Adding InputControlHost" dialog box.

![]() |
Note: It is highly recommended that you move all of the InputControlHost-based components to a separate .dll project that will not be rebuilt together with the main application. This allows you to avoid the following well-known issue: In VS2008 IDE, no property of the form or the C1InputPanel containing an InputControlHost can be changed when the application is debugged once. |