In my Form 1 I'm trying to change about 50 button images in this way:
button1 Image = new bitmap ("C: \\ x.jpg"); Button 2 Image = new bitmap ("C: \\ y.jpg"); Button 3 Image = new bitmap ("C: \\ z.jpg"); ..... etc ....
On any other event, I place all of the 50 buttons in my default images to use the Designer Properties window Want to do it or should I just announce the images ???
What I have tried and did not work:
Both tried:
properties.Settings.Default.Reset (); Properties.Settings.Default.Reload ();
You have to manually set the image again:
< Pre> foreach (button in button b) b.Image = _defaultImage; However you can make a small method and can pass in an array of your buttons. I can create a local form array of all buttons for easy access.
Comments
Post a Comment