Hello,
I have a rebar and toolbar from vbaccelerator on my MDI parent form. The problem is that the rebar and toolbar do not show when the form is loaded. On my child forms, there is no problem.
On the child form you can place the rebar and toolbar directly on the form. On the MDI form, that is not possible.
On the quick start guide from vbaccelerator they tell that you will have to put a picture box, allign on top, on the MDI form. Then it is possible the draw the toolbar and rebar on the picture box.
But when the form is loaded, only the picture box is shown, not the rebar and toolbar.
This should be the code for a simple menu, but it doesn't work.
Has somebody any idea how to show these bars on a MDI parent form?
Private Sub MDIForm_Load()
With cToolbar1
.ImageSource = CTBStandardImageSources
.ImageStandardBitmapType = CTBStandardSmallColor
.CreateToolbar 16, , True
.AddButton "New", CTBStdFileNew, , , "New", CTBNormal, "New"
.AddButton "Open", CTBStdFileOpen, , , "Open", CTBDropDown, "Open"
End With
With cReBar1
.CreateRebar Me.hWnd
.AddBandByHwnd cToolbar1.hWnd, , , , "Toolbar1"
End With
End Sub
Many thanks for any help.
Best regards,
Dries
I have a rebar and toolbar from vbaccelerator on my MDI parent form. The problem is that the rebar and toolbar do not show when the form is loaded. On my child forms, there is no problem.
On the child form you can place the rebar and toolbar directly on the form. On the MDI form, that is not possible.
On the quick start guide from vbaccelerator they tell that you will have to put a picture box, allign on top, on the MDI form. Then it is possible the draw the toolbar and rebar on the picture box.
But when the form is loaded, only the picture box is shown, not the rebar and toolbar.
This should be the code for a simple menu, but it doesn't work.
Has somebody any idea how to show these bars on a MDI parent form?
Private Sub MDIForm_Load()
With cToolbar1
.ImageSource = CTBStandardImageSources
.ImageStandardBitmapType = CTBStandardSmallColor
.CreateToolbar 16, , True
.AddButton "New", CTBStdFileNew, , , "New", CTBNormal, "New"
.AddButton "Open", CTBStdFileOpen, , , "Open", CTBDropDown, "Open"
End With
With cReBar1
.CreateRebar Me.hWnd
.AddBandByHwnd cToolbar1.hWnd, , , , "Toolbar1"
End With
End Sub
Many thanks for any help.
Best regards,
Dries