Drop modTVpropbag.bas into your project and you can save and restore treeviews with 2 simple calls. This is as close to "plug-n-play" as it gets... even a very new newbie can make this work in minutes.
I include a demo project for your perusal.
Supports multiple treeviews (easily modified to work with other controls). Saves and restores:
Nodes/child nodes, Node.Key, Node.Tag, Icons, Expanded state, sorted state, checked state. What else could you want for nothin'?
Version 1.0.1 implements the .tag property (per request) and is considerably cleaner/optimized code.
Appreciate your comments most.
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=70056&lngWId=1
The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.