I have an issue with loading forms in the Dock
When I use MDI they load poroperly. On being told to drop the MDI overhead the forms load off to the bottm right of the screen
Please help what is wrong with the code.
MDI loader
Document loader
When I use MDI they load poroperly. On being told to drop the MDI overhead the forms load off to the bottm right of the screen
Please help what is wrong with the code.
MDI loader
Shared Sub dockMDIForm(ByVal mydockableform As Form) 'Check if form already in Dock Dim hw As HostWindow = frmMain.radDockMain.GetHostWindow(mydockableform) If Not hw Is Nothing Then 'Just show the window frmMain.radDockMain.ActiveWindow = hw Else 'Create a new instance of the Form & add to dock mydockableform.MdiParent = frmMain mydockableform.Show() 'frmMain.radDockMain.DockControl(mydockableform, DockPosition.Fill, DockType.Document) hw = frmMain.radDockMain.GetHostWindow(mydockableform) frmMain.radDockMain.ActiveWindow = hw End If End SubDocument loader
Shared Sub dockForm(ByVal myForm As Form) myForm.FormBorderStyle = FormBorderStyle.None myForm.TopLevel = False myForm.WindowState = FormWindowState.Maximized 'Check if form already in Dock Dim hw As HostWindow = frmMain.radDockMain.GetHostWindow(myForm) If Not hw Is Nothing Then 'Just show the window frmMain.radDockMain.ActiveWindow = hw Else 'Create a new document Dim docWindow As DocumentWindow = New DocumentWindow() docWindow.Controls.Add(myForm) 'add to Dock With frmMain.radDockMain .AddDocument(docWindow, DockPosition.Fill) .ActiveWindow = docWindow End With docWindow.DockTabStrip.PerformLayout() End If End Sub