This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
A few classmates and myself are making a little music playlist windows form application for practice and I would like to code a button click event that allows the user to change between a couple of themes. So far I can manage to have the colours change no problem on a single form or even on multiple forms but the issue I'm having is that what I have so far doesn't seem like a very elegant solution.
if (BackColor==DefaultBackColor)
{
this.BackColor = Color.DarkGray;
f.BackColor = Color.DarkGray;
}
else
{
BackColor = DefaultBackColor;
f.BackColor = Color.DarkGray;
}
Basically right now I would be changing each individual forms colours manually on the button click and I'm wondering if there would be some easier solution like a global variable or a way to pass the changes between forms. I don't need a solution just a little nudge in the right kind of direction.
Subreddit
Post Details
- Posted
- 5 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/csharp/comm...