Click here to Skip to main content
15,793,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is my problem
I have a richtextbox with some syntax coloring that works just fine.
When opening a new file I'd like to syntax color automatically
During syntax coloring I suppress redraw with API functions.
Two scenarios:
A) I first " Manually " click into the Richtext box -Then I start syntax coloring
- Everything works as expected - NO flickering
B) I open a new file and then automatically try to syntax color the text
- Now I get the flickering of the "screen"
Therefore the solution seems simple = just focus the control first trough code .. but that's where I struggle
I have tried all kind of things including selecting text or InvokeOnClick(Me, System.EventArgs.Empty) and so on and so on ....
Non of them seem to mimic the same as me actually clicking into the control
Any Ideas ?
aidin Tajadod 16-Feb-12 16:22pm    
Focus did not work?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900