![]() |
DialogBar Problem in VB.Net |
Post Reply ![]() |
Author | |
TShriver ![]() Groupie ![]() ![]() Joined: 27 July 2008 Location: United States Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() Posted: 01 April 2009 at 4:28pm |
I have migrated our vb6 code to VB.net and have come upon an issue with the DialogBar in an MDI Form. When an MDIchild is present on the form and the parent is resized, the Child flashes in the upper left of the form until the resize event is complete. If there is no DialogBar the form resizes without any strange form drawing ghosts. In VB6 we used a PictureBox control as the container for the objects. In VB.net the PictureBox is no longer a container so we have used the Panel control as the container. Is there a correct way to use the DialogBar in .net or perhaps a work around? At the end of this post I have attached the CodeJock RibbonMDISample with the addition of a DialogBar to illustrate the problem.
Thank you for any help!
Tim
Here is a screen shot before the Resize:
![]() Here is a screen shot during the Resize:
![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Add it before you setup PanelSummary as Dialog Bar
Me.Controls.Remove(PanelSummary)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
TShriver ![]() Groupie ![]() ![]() Joined: 27 July 2008 Location: United States Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() |
Oleg,
I'm confused. When you say "Add it before you setup PanelSummary as Dialog Bar", what is the "it" you are referring too?
By "it" do you mean I should remove the DialogBar add the child form and then recreate the DialogBar??? I've tried that and other combinations. Could you be more specific?
Thanks,
Tim
This is the FormLoad part of the code that was attached in the previous post from the RibbonMDI Sample.
Private Sub frmMain_Load(ByVal eventSender As Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
CreateRibbonBar() CommandBars.KeyBindings.Add(ID.FCONTROL, System.Convert.ToInt32("N"c), ID.ID_FILE_NEW)
CommandBars.KeyBindings.Add(ID.FCONTROL, System.Convert.ToInt32("O"c), ID.ID_FILE_OPEN) CommandBars.KeyBindings.Add(ID.FCONTROL, System.Convert.ToInt32("S"c), ID.ID_FILE_SAVE) CommandBars.KeyBindings.Add(ID.FCONTROL, System.Convert.ToInt32("X"c), ID.ID_EDIT_CUT) CommandBars.KeyBindings.Add(ID.FCONTROL, System.Convert.ToInt32("C"c), ID.ID_EDIT_COPY) CommandBars.KeyBindings.Add(ID.FCONTROL, System.Convert.ToInt32("V"c), ID.ID_EDIT_PASTE) CommandBars.KeyBindings.Add(ID.FCONTROL, System.Convert.ToInt32("A"c), ID.ID_EDIT_SELECT_ALL) LoadIcons()
Dim StatusBar As XtremeCommandBars.StatusBar = Nothing
StatusBar = CommandBars.StatusBar StatusBar.Visible = True StatusBar.AddPane(0)
StatusBar.AddPane(ID.ID_INDICATOR_CAPS) StatusBar.AddPane(ID.ID_INDICATOR_NUM) StatusBar.AddPane(ID.ID_INDICATOR_SCRL) DialogBar = CommandBars.AddDialogBar("TaskPanel", XtremeCommandBars.XTPBarPosition.xtpBarTop)
DialogBar.Caption = "DialogBar" DialogBar.EnableAnimation = True DialogBar.Closeable = True DialogBar.EnableDocking(XtremeCommandBars.XTPToolBarFlags.xtpFlagAlignTop) DialogBar.Resizable = False DialogBar.ChildHandle = PanelSummary.Handle.ToInt32 DialogBar.ShowGripper = False DialogBar.SetSize(1800, 48) RibbonBar().EnableFrameTheme()
CommandBars.Options.KeyboardCuesShow = XtremeCommandBars.XTPKeyboardCuesShow.xtpKeyboardCuesShowWindowsDefault
Dim ctrl As Control
For Each ctrl In Me.Controls If TypeOf ctrl Is MdiClient Then CommandBars.SetMDIClient(ctrl.Handle.ToInt32()) End If Next ctrl ' Dim Workspace As XtremeCommandBars.TabWorkspace
CommandBars.EnableCustomization(True)
End Sub |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
By "it" I mean this line "Me.Controls.Remove(PanelSummary)" add "it" before "DialogBar = CommandBars.AddDialogBar"
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
TShriver ![]() Groupie ![]() ![]() Joined: 27 July 2008 Location: United States Status: Offline Points: 34 |
![]() ![]() ![]() ![]() ![]() |
Thank you!
Tim
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |