Print Page | Close Window

New User - Modal Forms?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5296
Printed Date: 20 June 2025 at 3:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: New User - Modal Forms?
Posted By: eSunkist22
Subject: New User - Modal Forms?
Date 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



Replies:
Posted By: SuperMario
Date Posted: 16 October 2006 at 9:52am
Just add a Commandbar control to each form you want to display them on.


Posted By: eSunkist22
Date Posted: 16 October 2006 at 12:43pm
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.


Posted By: eSunkist22
Date Posted: 16 October 2006 at 1:45pm
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


Posted By: eSunkist22
Date Posted: 16 October 2006 at 2:52pm
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.






Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net