Print Page | Close Window

Convert large app to use RibbonBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=11047
Printed Date: 21 November 2024 at 7:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Convert large app to use RibbonBar
Posted By: chrisABC
Subject: Convert large app to use RibbonBar
Date 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



Replies:
Posted By: joeliner
Date 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:)


Posted By: chrisABC
Date 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


Posted By: joeliner
Date 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.


Posted By: chrisABC
Date 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


Posted By: chrisABC
Date 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



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