Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - New User - Modal Forms?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

New User - Modal Forms?

 Post Reply Post Reply
Author
Message
eSunkist22 View Drop Down
Newbie
Newbie
Avatar

Joined: 15 October 2006
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote eSunkist22 Quote  Post ReplyReply Direct Link To This Post Topic: New User - Modal Forms?
    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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2006 at 9:52am
Just add a Commandbar control to each form you want to display them on.
Back to Top
eSunkist22 View Drop Down
Newbie
Newbie
Avatar

Joined: 15 October 2006
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote eSunkist22 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
eSunkist22 View Drop Down
Newbie
Newbie
Avatar

Joined: 15 October 2006
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote eSunkist22 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
eSunkist22 View Drop Down
Newbie
Newbie
Avatar

Joined: 15 October 2006
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote eSunkist22 Quote  Post ReplyReply Direct Link To This Post 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.



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.031 seconds.