Log buttons clicked and other user activity?
Is there a way to log all the buttons clicked on any form in my application from a central place (in the same application)?
I have a very big application so adding code to each button click will be a very big task.
If I can have an API function to log all button clicks on all forms, logging button name, form, etc it will help a lot.
Does anyone have any ideas?
Maybe API calls are not even needed?
:confused:
Re: Log buttons clicked and other user activity?
You would have to subclass each of your forms, and then catch the corresponding WM_LBUTTONUP-Messages
Re: Log buttons clicked and other user activity?
Thanks for the reply.
Can you give me a bit more info please?
Maybe a small example?
Re: Log buttons clicked and other user activity?
Subclassing is pretty advanced stuff, but there are good tutorials on the net. Just have a look at google with " visual basic windows subclassing"
5 Attachment(s)
Re: Log buttons clicked and other user activity?
Here is a small example of what Zvoni was talking about. The subclassing code here uses the BN_CLICKED notification code instead of the WM_LBUTTONUP message so that only a few controls will need to be subclassed.
Re: Log buttons clicked and other user activity?
Yeah!!!
That's what I'm talking about!
Thanks a lot guys!!