| RTL reference|Glossary|Tips/Tricks|FREE App/VCL|Essentials|Books|Link Back |
| Monitoring Registry Changes | ||||||||||||||||||||
| Page 3: Sample Delphi Registry monitoring application | ||||||||||||||||||||
Since we now have developed a thread that monitors the Registry and listens to specified changes, let's see how to call the monitoring code from a Delphi project. If you recall, you have dropped a TMemo component on a form, when any specified change occurs, the change will be reported in this memo.
Next, we add the code in the message handling procedure
The actual WMREGCHANGE procedure is declared as
The above procedure responds to a WM_REGCHANGE message defined in the TRegMonitorThread class as a user defined message.
This is how the "program" looks at run time (after some manual Registry editing)
![]() As you can see, the code "only" reports that a change has been captured, it does provide the time of the change but no other information like, for example, the name of the key added / deleted / edited. Source codeThat's it. As I always love to say: "as simple as only Delphi can be!". The next page of the article provides the full source to both the TRegMonitorThread class and the sample project.If you have any questions please post to the Delphi Programming Forum. Next page > Full Source Code > Page 1, 2, 3, 4 |
||||||||||||||||||||
All graphics (if any) in this feature created by Zarko Gajic.
| More Delphi |
|
· Learn another routine every day - RTL Quick Reference. · Download free source code applications and components. · Talk about Delphi Programming, real time. · Link to the Delphi Programming site from your Web pages. · Tutorials, articles, tech. tips by date: 2003|2002|2001|2000|1999|1998 or by TOPIC. |
| Stay informed with all new and interesting things about Delphi (for free). |
|
|
| Got some code to share? Got a question? Need some help? |


