|
After adding the form (HostForm) to the project and the tool window (twHostWindow) in which you wish to host the form, add the following code in the Form1_Load event: [Visual Basic] Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim f2 As New HostForm() f2.Show() Me.twHostWindow.HostedControl = f2 End Sub
[C#] private void Form1_Load(object sender, System.EventArgs e) { Form2 f2 = new HostForm(); f2.Show(); this.twHostWindow.HostedControl = f2; } For complete step-by-step instructions for hosting a Windows Form inside of a tool window, see the following walkthrough in the SharpUI for .NET User Guide: Using Tool Windows.
Jennifer-DD
|