Talk2Tom11
08-05-2004, 09:55 PM
I was wondering how to make a label on a form read what the value of a key in the registry. But if it is changed when the form is open, I want the label to change. I can get it to load and read the registry, and display it, but I want to be able to change the key and then the label will change. without having to rerun the app.
how about a timer that checks the value in a certain interval?
MKoslof
08-06-2004, 05:18 PM
So you want to automate the process of updating the label..meaning if the value in the registry key changes, automatically change the value in the lable. Well, what will determine when the registry value has changed.
What you can do is, when the application first loads, get the current value of the registry key and store this in a string variable. Then, like already mentioned, implement a timer that checks this registry key for a given interval, say 2 minutes. If the current value has changed when compared to the initial stored value...update the label caption, etc.