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?
You would have to subclass each of your forms, and then catch the corresponding WM_LBUTTONUP-Messages
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
Subclassing is pretty advanced stuff, but there are good tutorials on the net. Just have a look at google with " visual basic windows subclassing"
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
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.
Last edited by Bonnie West; Jan 2nd, 2014 at 11:41 AM.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0