Perfmon that comes with your computer can do this. You can also add a column to the process tab of the task manager (Handle Count).
Instructions for Perfmon
- Add a counter (click +)
- Select "Process" under "Performance Object"
- Select the pen counter in the counter list
- Select your process from the list of instances.
- Click "Add", click "Close"
To get a graph in a range, you must right-click on it in the list, select the properties, and then select the correct scale (.1 or .01 will probably be correct)
Edit (in response to the information added): I think you simply proved that creating RichTextBoxes does not result in the assignment of Handles. I donβt think this is really necessary until you edit the control, and it can be smart enough to do this, since allocating too many resources for the control that is inactive will make it difficult to have too many controls on (think about Excel, for example).
source share