[QUESTION] Imagemanager icons |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Posted: 25 July 2011 at 2:08am |
Hi,
What would be best way to use Imagemanager control with CJ controls?
At the moment I'm using an ImageManager control for every form and sometimes more than one if it contains DockingPanes (in this case I have an IM per pane, because in the beginning I didn't know what was best way to implement DP, Form or PictureBox, and I was still able to just copy and paste in form/picturebox).
I'm asking this because if I would use just one IM for every form and several controls will add all images (also the ones that won't be used) does the memory consumption increase a lot, won't it? On the other hand I don't have to add images which I already added to another IM (because the image is needed again but now with another ID (no I don't want a set another IconIndex, just because) So executable will be larger than with one IM, right?
Maybe you can give me some advice (other members advices are also welcome)
Thanks a lot
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Hi Aaron,
Personally I find that it depends on the project I am working on, but in most cases when I know the project will involve many forms I tend to use just one ImageManager control and place this on the main form. Within a module I create a list of images that start: Public Const ID_IMAGE_<IMAGENAME> = 1000 That way I can build up a list of reusable images, albeit in most cases images are not used again and again but as you suggested this means you only have one ImageManager control in your project thus keeping the compiled file size down. It does mean that finding an image is easy as they are all referenced in the same module. The range I use for the ID No. I always make sure that I start at lets say 1000 so I can grow this up to 1999. So I start my next ranges for lets say Menu's at 2000 that way I should never have any conflict. Also in v15.1.1 CJ have implemented the use of .png alpha icons within the ImageManager. Not that the .bmp files were that big but changing to the .png file helps decrease the size (just a little!) But again it's all down to personal choice, each to their own. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Alexander,
Thanks for reply, I also think one ImageManager would be best thing to do (to keep the project 'clean' but as I said before, I don't want to add code just to set a different IconIndex (don't know if this would enlarge compiled exe also... I have a huge amount of images so adding a line of code for every button, toolbar & menu, I guess this would enlarge the exe also and more work ) If you have one IM and load images into for example ReportControl you also load those images which are never going to be used (so if you have a lot of controls and forms, you are loading maybe 10-20 copies of the same image into memory)
About: Also in v15.1.1 CJ have implemented the use of .png alpha icons within the ImageManager
huh? I already have these kind of images loaded into IM. (or I don't understand what you mean...)
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Hi Aaron,
Yeah I can see what you mean about having one ImageManager but then loading that into each CommandBar, ReportControl or what not. I suppose this would as you say mean having allocated memory for images you don't need. Another method could be to have a few ImageManagers on your Main Form, group the icons that you use mostly in CommandBars into one, the others for ReportControls into another. Again it's not the perfect solution, but it would help reduce the need for placing individual ImageManagers on every form. As for "Also in v15.1.1 CJ have implemented the use of .png alpha icons within the ImageManager", it was something I noticed in their Release Notes, I didn't realise it was already available or I would have been using it too. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
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 |