Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > General Discussion
  New Posts New Posts RSS Feed - Convert large app to use RibbonBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Convert large app to use RibbonBar

 Post Reply Post Reply
Author
Message
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Topic: Convert large app to use RibbonBar
    Posted: 16 June 2008 at 4:26am
I am converting a large business application (VB6) to use CJ RibbonBar.  The existing application has many Forms, and each Form has its own Menus and Buttons.

I think it will be neater if all these Menus/Buttons are moved to the RibbonBar, and when a Form is selected the RibbonBar will just show the items for that Form.

If I add the code for all those Menus/Buttons to the MainForm RibbonBar it will become very large and complicated.  So I am thinking a better way will be to get each Form to create its own Tabs/Groups on the RibbonBar when it is loaded. And then delete them when the Form is unloaded.

Just wonder if you have any thoughts or advice. Have other people done this?  Anything to watch out for?


Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 1:37pm
Hi chris!

Been thinking of doing the same thing for my fairly large and growing VB6 app. Currently all my controls are CJ based. So i have the main functions of the app on the ribbonbar then each form actions on a commandbar at the top of the child form.

I usually create xml files from designer that i call on runtime to reduce the size of app. I currently have 10 tabs in the ribbon and i realised without the ribbonbar designer it becomes quite tangling strings of code. For some forms that have many actions like reports, i use show/hide for tabs.

just ideas:)
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 2:07pm
I'm starting to move sections of code into separate modules to make the main form (with Ribbon) code smaller.  And then looking at having functions to do the common tasks.

There is a lot of unmentioned stuff with the CodeJock Controls, hidden in Samples and Utils.  Maybe they've already dome all this sort of thing?

> I usually create an XML File.........
Sounds good but I don't know what this means.
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 2:20pm
>xml file..

for commandbars that i design in Commandbars Designer i export to XML document and load them in code.

for ribbonbar - av got to use the long way home. I create the commands by code in a dll. since the compiled dll is more than 1MB, i generate xml file from the generated ribbon that i will load for the main form.

This would be a good way of doing it since ribbonbar designer will support xml import/export:)

wise indeed.
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 2:39pm
Originally posted by joeliner joeliner wrote:

>xml file..

 Commandbars Designer i export to XML document and load them in code.

since ribbonbar designer will support xml import/export:)



Ah!  I am new to this product and I have not yet used the CommandBars Designer.  When the RibbonBar Designer is available I will look at doing this also.


Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Posted: 20 June 2008 at 1:14pm
First tests look good.

The main Form can call another form, and pass the RibbonBar by Ref.  The other form then can hide all Tabs on the Ribbon, and then add its own Tabs and Groups.

When a ControlButton is clicked, the Main Form can pass the ID to the other form which then handles whatever action is required.

A quick example program showed that this all works OK.

I think this means I will not need to have any toolbars or menus  on the other forms. Everything will be done by the Ribbon.  We will see if this is practical.
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
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.125 seconds.