Reputation: 8821
I'm using this MSDN sample in my project and by default on startup the display is color hex code #442288 (rgb is (68, 34, 136). Except that no where in the classes or files can I find this color. I want to change the color so that when the user starts the program he isn't greeted with this horribly unaesthetic and saturated color. The color has a violet hue and is most closely related to the color Windsor.
Normally I would just do a GraphicsDevice.Clear to the color I want right when I start the application but I cannot begin drawing until a file is loaded. Because of this, until the user loads a specific texture the form contains this ugly purplish color.
Not the most serious of problems, of course, but with my project almost complete I am finally tackling these problems that have existed since the beginning.
Edit: I suppose I could hide the control until a user has loaded a file but I'm still curious as to where this mysterious color is stored.
Edit #2: Actually, that doesn't seem to work too well because if the control is not visible I cannot fetch its GraphicsDevice and consequently, I cannot create a spriteBatch. Also, setting the control to visible right before grabbing its GraphicsDevice does not work either. Doesn't seem like hiding the control will fix this problem. Besides, changing the default color would be so much simpler and more elegant.
Upvotes: 0
Views: 425
Reputation: 17909
What's weird is that the Code indicates that the form should be Color.CornflowerBlue:
GraphicsDevice.Clear(Color.CornflowerBlue);
I hate to ask, but you haven't changed your windows color profile and accidentally redefined one of the main colors instead of a custom color ?
Edit: Just another investigation point.
Can you put a breakpoint in Mainform.designer.cs, on line 31 and at that point investigate the BackColor property of this
?
Upvotes: 1