Change properties with button
-
I have a button and the code on its this:
btnStartMnu.Image = System.Drawing.Image.FromFile("Themes\\WinME2\\WindowsMEButton1.bmp"); Sound.Play("Sounds\\Camera.wav",PlaySoundFlags.SND_ASYNC); MessageBox.Show("Theme changed to Windows ME 2!", "Theme Changed"); string appPath = Path.GetDirectoryName(Application.ExecutablePath); m_appSettings.Save(appPath + "\\Settings\\Settings.xml"); m_saved = true;
When you click button, it changes its image and then saves the info in a XML file. What I want to know is how to add code so it will change the colour of a panel called pnlleft to red and panlright change its colour to yellow. How would you do this? Also is there a way to change a fileMenu colours well? In the end we're all just the same -
I have a button and the code on its this:
btnStartMnu.Image = System.Drawing.Image.FromFile("Themes\\WinME2\\WindowsMEButton1.bmp"); Sound.Play("Sounds\\Camera.wav",PlaySoundFlags.SND_ASYNC); MessageBox.Show("Theme changed to Windows ME 2!", "Theme Changed"); string appPath = Path.GetDirectoryName(Application.ExecutablePath); m_appSettings.Save(appPath + "\\Settings\\Settings.xml"); m_saved = true;
When you click button, it changes its image and then saves the info in a XML file. What I want to know is how to add code so it will change the colour of a panel called pnlleft to red and panlright change its colour to yellow. How would you do this? Also is there a way to change a fileMenu colours well? In the end we're all just the sameHey, as long as you are in the same class you can simply use pnlleft.BackColor = Color.Red; (same with the other panel) for the filemenu it is bit more complicate - the can only change the backcolor of one item - so the only way i know to change it all would be to go through every item.