![]() |
Managing CommandBars design |
Post Reply ![]() |
Author | |
Nomlas ![]() Newbie ![]() Joined: 15 December 2006 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() Posted: 29 December 2006 at 9:34am |
Hoping some more experienced Codejock developers will share their thoughts on managing the development of lots of toolbars in a VB6 application. I'm working on a large MDI application with a main menu bar and toolbar, and separate toolbars and context popups for many child windows. I've experimented with the designer and creating everything in code. I'm leaning toward the designer. But it's slow going given the lack of documentation (beyond the simple tutorial). One question, to hopefully start a discussion: Should I try and put all commandbars, say 20, in the same XCB(XML) file, load them in the main MDI module initially and selectively enable/disable in the appropriate forms? Or, would it be better to create a separate XCB for each one? Would really appreciate hearing how others approach this, before committing.... |
|
![]() |
|
LittleJK ![]() Senior Member ![]() ![]() Joined: 13 April 2006 Status: Offline Points: 168 |
![]() ![]() ![]() ![]() ![]() |
From my experience, xml and vb6 can become quite slow when using it as a configuration tool to build toolbars and their popup menus. This is due to that an xml file is parsed from top to bottom going through each line until it finds the start and end tag of the specified menu or tool bar you are calling.
I would keep everything in a separate file and not load all at once from the beginning when launching the mdi form. I don't even know if it's possible to load all the command bars without having the child forms loaded? By loading each commandbars.xcb file on the form load of each child, then you will split the load. Also, it would be extreme brain damage or if you have a great xml editor to keep track of what command bar you want to modify if you place everything in one file, let a lone the icon images are not being referenced from location but loaded in multiple times. I asked a similar question before about xcb verse going the coding route to the codejock gurus and their reply is that coding it is the way to go. I whole heartly agree with them. At first, I was sold on the designer because it was a gui version but once you start to get really in depth with all the coding (which you still have to do) that is associated with it. It's really hard to keep track of what command bar, buttons and actions without being able to see it in the code per form. Plus to use the xcb files you really need to understand the coding end. Right now, in one of our development projects has over 50 command bars and we are about half way on to completion of all the forms. It takes some organization such as using private subs to organize the form load, create modules to house the configuration properties of your command bars so you don't have to keep cutting and pasting the same declarations which comes in handy with other codejock controls, loading the images into the commandbar imagelist (which if you are going use the same icons through out the application then you set the constant to it's ID)and setting constants without duplication. |
|
![]() |
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 |