Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - ImageManager design time import function?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ImageManager design time import function?

 Post Reply Post Reply
Author
Message
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Topic: ImageManager design time import function?
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post 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.
 
 
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).
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2008 at 3:59am
Great! That's what I was looking for!
Thank you Oleg!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.