Post

 Resources 

Console

Custom Resource Files Using Property Bags


The Property Bag



If you've ever made a user control, you will probably know that a property bag is, because that's where it's used the most.

Basicly a property bag is a virtuel container that can store almost any type of value. All infomation in the property bag is stored in Visual Basic's Variant-format. This allows for the user, that would be you, to add data to the property bag, and not worry about what kind of data it is. Be warned though, because the Variant-format can store any kind of data, you must carefully handle how you read the value that you've stored. You don't want to accidently try and sqeeze a picture-file into a Integer-variable.

The Variant-format is also the slowest variable-type due to its non-restrictive nature, but in most cases we only need to extract or store the values a few times during the programs execution so that won't be a problem.




Next: Storing And Extracting Data From A Property Bag | 1 | 2 | 3 | 4 | 5

1 comment

Tutorial Console

Tutorial by:

Anders Nissen


Date: 2004 Oct 11


Navigate



1 comment

Latest comment


by: Eric Coleman

Very nice tutorial! I always thought the property bag was for custom controls only. This looks like a nice replacement for .ini files.

Post a Comment


Printer Friendly



Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 58 visitors within the last 20 minutes
RSS News Feed