Save ListView contents..

  • Thread starter Thread starter Adam Plocher
  • Start date Start date
A

Adam Plocher

I have an application that loads a few hundred icons (all seperate
icons files) along with some meta data into a ListView control but it
takes quite a while to load all of these individual files. Is it
possible to somehow save all of the icons from the listview controls
(and maybe the meta data) into a single file that can be quickly loaded
back into the application, or am I just speaking nonsense?

Thanks a lot
-Adam
 
Adam,

You can serialize the ListView, but depending on the size this is not going
to be the fastest loade/save. If you want speed and felxibility you should
come up with your own file structure.
 
Hi Stoitcho, thanks for the prompt reply. Could you explain this file
structure thing slightly? Are you just talking about copying
(cacheing) the ico and pngs into a local directory? This would help
for people running the application on files over the network, but I
don't think this would help for people running it locally would it?
I'll look into serializing but it doesn't sound like it would help very
much with speed.

Thanks again
-Adam
 
Adam,

The file structure I have in mind is something like "Compound Documents"
`that windows API supports. Basiclly the idea is that the file inside is
organized as a whole file structure with folders (storages) and files
(streams). On the disk this is only one file, but programs have the
fexibility to organize their data as they please.
This is the idea. I don't know if there .NET. the implementation open to
the public. This functionality, in the API, is all COM interfaces +
StgCreateDocfile function for creating the document.
You can find more info on this in MSDN.
 
Back
Top