1 Attachment(s)
VB6 - Store multiple states in a single variable
If you are new to programming you would probably use seperate status fields in a database to define individual statuses. This is not needed if you know a bit about boolean algebra.
The technique I use in the attached project is the same as is used in the windows api. Using this technique will make you write many fewer lines of code to achieve the same result. It also organises your work and allows you to reduce the size of status information stored in a file or in a database.
To better understand this, you should do a search on 'boolean algebra' or 'binary number system'. If I had lots of time I could explain it fully.
If you find this code useful, then please post back with your comments. Send me a pm if you need help.