Print Page | Close Window

ImageManager design time import function?

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=9522
Printed Date: 28 September 2024 at 5:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ImageManager design time import function?
Posted By: Jean
Subject: ImageManager design time import function?
Date Posted: 07 February 2008 at 9:18am
We have a lot of single png files that we are using for the CommandBar.
Is there a way to import multiple files together in the IDE in design time?
 
We are looking for some kind of batch processing of png files from a folder so we don't have to import them manually.
 
It is easy to import the images in runtime, but there's no runtime-export function.
Otherwise we could import the exported file in design time.
That would be nice.



Replies:
Posted By: Oleg
Date Posted: 07 February 2008 at 1:27pm
Hi,
 
You can load them in runtime, use CommandBars.DoPropExchange to export them to xml and in desigtime load this xml from properties of ImageManager.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Jean
Date Posted: 08 February 2008 at 3:36am
Here's my test project. I'm not shure, but I think the CommandBar-Control can not export only the images from the ImageManager. The SaveStateToXMLString doesen't work on my sample in this case.
http://forum.codejock.com/uploads/20080208_034500_ImageManagerSam.zip - uploads/20080208_034500_ImageManagerSam.zip
 
 
What I like to do:
 
 
I like to save the images without CommandBar.
I need to export the images in the Image Manager in runtime the same way I can do it in designtime. 
Look at picture : "Export To XML".
 
We can import new images in runtime (batch processing a folder) and we like to export them in runtime to XML.
After this we like to import them in design time.
With this steps we would have all the images in the vb form files (frm/frx).


Posted By: Oleg
Date Posted: 08 February 2008 at 2:49pm
Paste this code to your sample:
 
Private Sub Command2_Click()
Set CommandBars1.Icons = ImageManager1.Icons
Dim myStateOptions As StateOptions
Set myStateOptions = CommandBars1.CreateStateOptions
myStateOptions.SerializeImages = True
myStateOptions.SerializeLayout = False

Dim PropExchange As PropExchange
Set PropExchange = CommandBarsGlobalSettings.CreatePropExchange
PropExchange.CreateAsXML False, "DesignerFile"
CommandBars1.DoPropExchange PropExchange, myStateOptions
PropExchange.SaveToFile App.Path & "\Output.xml"
End Sub
 


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Jean
Date Posted: 12 February 2008 at 3:59am
Great! That's what I was looking for!
Thank you Oleg!



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