Reserved Image IDs
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=12858
Printed Date: 22 November 2024 at 6:14am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Reserved Image IDs
Posted By: briansweat
Subject: Reserved Image IDs
Date Posted: 04 December 2008 at 2:49pm
I'm just getting started with an ImageManager that will initially contain over 80 icons. I was planning on using a five digit number, where the first digit represents the category (in our application). For example, 10001, 10002, 20001, 20002, 20003, etc.
I recall seeing some comments about a few reserved IDs, but I can't find that list anywhere. Can someone point me to that?
------------- SuitePro 2008 version 12.1.0, VB 6.0 SP6
Brian Sweat
Alterity, Inc.
http://www.acctivate.com - www.acctivate.com
http://twitter.com/briansweat - twitter.com/briansweat
|
Replies:
Posted By: Oleg
Date Posted: 05 December 2008 at 2:29am
Hello,
Try avoid range from 9000 to 10000.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: briansweat
Date Posted: 05 December 2008 at 9:12am
Thanks! I started with 10001, so that's perfect!
------------- SuitePro 2008 version 12.1.0, VB 6.0 SP6
Brian Sweat
Alterity, Inc.
http://www.acctivate.com - www.acctivate.com
http://twitter.com/briansweat - twitter.com/briansweat
|
Posted By: braian87b
Date Posted: 11 February 2009 at 12:40pm
oleg wrote:
Hello,
Try avoid range from 9000 to 10000. |
Can i ask to you why to do this?
i have been problems time ago... because i have a imagemanager1 in a form1 and a imagenager2 in form2 then, if whant to load the iconid 101 from imagemanager2 in form2... it loads the iconid101 from imagemanager1...
this is a bug or what??? what is the reason of this?... since the, i have to control the id's of the imagemanagers of the entire proyect to avoid duplicates that could perform a mistake. :(
------------- Product: Xtreme SuitePro (ActiveX) version 11.
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP 6
Spanish, Espaņol, English.
Argentina
|
Posted By: briansweat
Date Posted: 11 February 2009 at 1:24pm
I'm not sure what the 9000 to 10000 IDs are for, but I will comment on using multiple ImageManager controls.
We have many forms that have a "Save" CommandBar control. Instead of duplicating those icons on each form, we found it easier to just have a single ImageManager. The ImageManager is on an invisible form. We can easily update an icon in one place and it will immediately update all controls throughout our application.
We've used the same approach for images on PushButton controls. When each form loads, we call a global routine that sets the Icon based on an ID parameter. It retrieves the icon using the Icons.GetImage() method of the ImageManager.
I'm not sure if that helps, but I wanted to share my experience.
------------- SuitePro 2008 version 12.1.0, VB 6.0 SP6
Brian Sweat
Alterity, Inc.
http://www.acctivate.com - www.acctivate.com
http://twitter.com/briansweat - twitter.com/briansweat
|
Posted By: braian87b
Date Posted: 12 February 2009 at 11:00am
briansweat wrote:
I'm not sure what the 9000 to 10000 IDs are for, but I will comment on using multiple ImageManager controls.
We have many forms that have a "Save" CommandBar control. Instead of duplicating those icons on each form, we found it easier to just have a single ImageManager. The ImageManager is on an invisible form. We can easily update an icon in one place and it will immediately update all controls throughout our application.
We've used the same approach for images on PushButton controls. When each form loads, we call a global routine that sets the Icon based on an ID parameter. It retrieves the icon using the Icons.GetImage() method of the ImageManager.
I'm not sure if that helps, but I wanted to share my experience.
|
Yes, it helps but as a tecnique for centralize a resource (image-icon) to improve the modifications and memory usage...
What i have did say is:
Braian87b wrote:
I have had problems time ago... because i have a Imagemanager1 in a form1 and a Imagemanager2 in Form2 both with different icons with iconId 101. then, if i want to load the iconid 101 from Imagemanager2 (in form2)... it loads the iconid 101 from imagemanager1 (form1) instead...
|
I mean: that is a bug i think... because it happens when the proyect is compiled and not when is in VB IDE. It seems like their share the id's in the entire proyect exe. Understand??
------------- Product: Xtreme SuitePro (ActiveX) version 11.
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP 6
Spanish, Espaņol, English.
Argentina
|
Posted By: briansweat
Date Posted: 12 February 2009 at 11:17am
Ah, okay. I guess I didn't run into this since we use unique Icon IDs across the entire application. I'm using a 5 digit ID, where the first two digits represent the component and the last 3 identify the specific icon. That way, we can add more icons into a particular component and keep them together in the group.
Here's an example of our list....
' General Icons Public Const Icon_General_New = 11001 Public Const Icon_General_Edit = 11002 Public Const Icon_General_Save = 11003
' Sales order icons Public Const Icon_Sales_Quote = 12001 Public Const Icon_Sales_Order = 12002 Public Const Icon_Sales_Credit = 12003
' Inventory icons Public Const Icon_Inventory_Product = 13001 Public Const Icon_Inventory_Warehouse = 13002 Public Const Icon_Inventory_Lot = 13003
|
With this example, I would use Icon_Sales_Order for the MDIMenu, the CommandBar on the MDI and any PushButton controls that need to display a sales order.
------------- SuitePro 2008 version 12.1.0, VB 6.0 SP6
Brian Sweat
Alterity, Inc.
http://www.acctivate.com - www.acctivate.com
http://twitter.com/briansweat - twitter.com/briansweat
|
Posted By: braian87b
Date Posted: 12 February 2009 at 11:20am
briansweat wrote:
Ah, okay. I guess I didn't run into this since we use unique Icon IDs across the entire application. I'm using a 5 digit ID, where the first two digits represent the component and the last 3 identify the specific icon. That way, we can add more icons into a particular component and keep them together in the group.
Here's an example of our list....
' General Icons Public Const Icon_General_New = 11001 Public Const Icon_General_Edit = 11002 Public Const Icon_General_Save = 11003
' Sales order icons Public Const Icon_Sales_Quote = 12001 Public Const Icon_Sales_Order = 12002 Public Const Icon_Sales_Credit = 12003
' Inventory icons Public Const Icon_Inventory_Product = 13001 Public Const Icon_Inventory_Warehouse = 13002 Public Const Icon_Inventory_Lot = 13003
|
With this example, I would use Icon_Sales_Order for the MDIMenu, the CommandBar on the MDI and any PushButton controls that need to display a sales order.
|
I know that could be do in that way... BUT I WANT TO KNOW the reason of the bug that i described. that's all!
------------- Product: Xtreme SuitePro (ActiveX) version 11.
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP 6
Spanish, Espaņol, English.
Argentina
|
|