or
Below is the code being used to create the dock form, and the activated event code. Any help on why this event is fired 3 tiems would be greatly appreciated, and if we should be using a different event let us know.
| Private Function CreateDockedDoc(ByVal caption As String, ByVal size As System.Drawing.Size, ByVal formName As String) As UserDockForm |
| Dim myform As Form = CType(Me.GetType.Assembly.CreateInstance(formName, True), Form) |
| myform.MdiParent = Me |
| Dim dockDocument As UserDockForm = CType(myform, UserDockForm) |
| dockDocument.Text = caption |
| TryCast(DockingManager1.PrimarySite, DockSite).SetDocument(dockDocument) |
| dockDocument.CloseButtonVisible = False |
| Return dockDocument |
| End Function |
| Private Sub frmSystemCodePayPeriodSetup_Activated(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Activated |
| System.Console.WriteLine("Form activated ........") |
| End Sub |