Einhugur TreeView flicker on Windows

I’m wondering whether I’m doing all I can be doing to reduce, if not eliminate the control’s flickering on Windows, or if I’ve got it as good as it gets. It comes down to whether I’m using the LockDrawing property correctly. I’m returning my attention to this after just living with it for a few years.

All along, I’ve been setting LockDrawing to True at the beginning of a method/event handler, and False at the end. The documentation suggests that this is the right way.

My new experiment is to make True the default. Then after my code sets False, it fires a single Timer to reset True.

In the debugger, on my Windows 10 Fusion VM, I’m squinting to determine whether I see, or just imagine any improvement. But I certainly didn’t make it worse.

Any hints, or am I just up against a known issue?


Check the Windows Direct2D notes.txt that comes with the control


Thanks Björn, that works perfectly! I’m sorry I overlooked this as I was playing with some of the examples.

Jerry very happy! :slight_smile: