Hello.
I am creating an application that has a RichTextBox
that has text of varying colors based on what the information represents (red for errors, black for standard messages, etc). I am attempting to support Windows themes, and the possible variance of system colors. To do this, I created a method of changing the default text colors based on the Window
system color, by making each color either lighter or darker, so it contrasts well.
However, while testing this system, I found that if I change the theme while the program is running, it silently exits, without any explanation or even an exception. It just exits. I tried placing a breakpoint after the call to Application.Run
, and Windows hung at the "Please wait..." screen Explorer puts up while it modifies the theme. After a minute, the screen went away, and, sure enough, the breakpoint had been hit, which means that it doesn't kill the process outright.
My question is, why does it do this, and is there a way I can stop it from doing this?
Thanks.