|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Print information when ANY control is usedI have an application with hundreds of controls that has
an error that is difficult to reproduce. I would like to instrument the software to trace everything the user does so I can reproduce it. How can I write selected information to a file each time the user uses ANY control? (I mainly have buttons, textboxes and comboboxes.) I would like to do this without explicitly writing a handling routine for each control and also without disturbing the handling routines that already exist. Thanks Tom,
You can create an event in a recursive loop for an event that you are not using and know that it is firing by instance Enter (which does not fire for a button, therefore search for that what fits you the best) The events for that you can build in one time by instance using this routine. \\\ Private Sub Form1_Load(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles MyBase.Load doset(Me) End Sub Private Sub doSet(ByVal parentCtr As Control) Dim ctr As Control For Each ctr In parentCtr.Controls AddHandler ctr.Enter, AddressOf meEnter doSet(ctr) Next End Sub /// I hope this helps, Cor
guidelines for developing an application
Form question (Re-usuable code) Icon for Components How do you protect from pirating? copying data from MS-SQL to MS-Access using VB.Net Anyone know what could cause the following error messages? SqlCommand w/ Params Select Issue Using the IN Clause breakpoint in vb.net Queue Thread Safe question get the value of the selected node in a treeview |
|||||||||||||||||||||||