ImageManager design time import function? |
Post Reply |
Author | |
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
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.
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).
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
Great! That's what I was looking for!
Thank you Oleg!
|
|
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 |