Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - DialogBar Problem in VB.Net
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DialogBar Problem in VB.Net

 Post Reply Post Reply
Author
Message
TShriver View Drop Down
Groupie
Groupie
Avatar

Joined: 27 July 2008
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote TShriver Quote  Post ReplyReply Direct Link To This Post Topic: DialogBar Problem in VB.Net
    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:
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2009 at 5:09am
Hi,
 
Add it before you setup PanelSummary as Dialog Bar
 
Me.Controls.Remove(PanelSummary)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
TShriver View Drop Down
Groupie
Groupie
Avatar

Joined: 27 July 2008
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote TShriver Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2009 at 8:50am
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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 April 2009 at 12:56am
Hi,
 
By "it" I mean this line "Me.Controls.Remove(PanelSummary)" add "it" before "DialogBar = CommandBars.AddDialogBar"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
TShriver View Drop Down
Groupie
Groupie
Avatar

Joined: 27 July 2008
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote TShriver Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2009 at 10:08am
Thank you!
 
Tim
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.