![]() |
New User - Modal Forms? |
Post Reply ![]() |
Author | |
eSunkist22 ![]() Newbie ![]() ![]() Joined: 15 October 2006 Location: Canada Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() Posted: 15 October 2006 at 4:41pm |
I am still evaluating this product for my company. I really like the control so far, but I just need to know how much we may need to change our program around to accomodate the CommandBars control.
In my test programs (visual basic) I have not been able to get a toolbar to appear on a child or modal forms... just the MDI form. Just wonderinf if anyone knows if this is how the CommandBars works. We use regular VB Command buttons on most modal forms, but if we can move to using a toolbar to make it look nicer, and save space, it would be nice. I think my company will go for buying this control, I just need to clarify this for my spec for them. Thanks! Erica |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Just add a Commandbar control to each form you want to display them on.
|
|
![]() |
|
eSunkist22 ![]() Newbie ![]() ![]() Joined: 15 October 2006 Location: Canada Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
I did draw a command bar on a modal form, and a child form, added 3 buttons to each toolbar, and when the form loads, i get a small blank toolbar. There are images for each button as well.
This is the code on my modal form: ~~~~~~~~~~~~~ Dim objBar1 As CommandBar Set objBar1 = CommandBars1.Add("Edit", xtpBarTop) With objBar1 Call AddControl(.Controls, xtpControlButton, ID_EDIT_COPY, "&Copy", False, "Copy selected text", xtpButtonIconAndCaption) Call AddControl(.Controls, xtpControlButton, ID_EDIT_CUT, "C&ut", False, "Cut selected Text", xtpButtonIconAndCaption) Call AddControl(.Controls, xtpControlButton, ID_EDIT_PASTE, "&Paste", False, "Paste Clipboard Contents", xtpButtonIconAndCaption) End With Set CommandBars1.Icons = mdiMain.ImageManager1.Icons CommandBars1.Options.UseDisabledIcons = True CommandBars1.Options.SetIconSize True, 16, 16 CommandBars1.Options.UpdatePeriod = 100 CommandBars1.Options.ShowExpandButtonAlways = False CommandBars1.VisualTheme = xtpThemeNativeWinXP ~~~~~~~~~~~~~ And nothing appears. |
|
![]() |
|
eSunkist22 ![]() Newbie ![]() ![]() Joined: 15 October 2006 Location: Canada Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
Ok, nevermind, now it's working.
I was just messing with the code and the toolbar and suddenly it appeared. It's almost like it needed to refresh or something. Maybe it's because I'm still using a trial version of the commandbars. :) Thanks for the time though Erica |
|
![]() |
|
eSunkist22 ![]() Newbie ![]() ![]() Joined: 15 October 2006 Location: Canada Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
I determined the problem I was having by fluke. I was creating a single toolbar on this one small modal form, and it appeared to be creating an empty menu as well, which was causing problems.
So I changed my code to make a menu with one option (File - Close). I then set the CommandBars.ActiveMenuBar.Visible property to False And my toolbar pops up without problems. ![]() Is this just a quirk of the control? It's not a big deal, we can work around this if need be. |
|
![]() |
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 |