Code
foreach (System.Windows.Forms.Button b in this.Controls)
{
b.Image = WindowsApp1.Properties.Resources.BtnImg;
}Error2:
Code
String temp = ListBox1.Items[0].ToString
FroglegRank #1,020 · 1.9K reputationPosted Jan 17, 2011, 6:03 PM EST
foreach (Control b in this.Controls)
{
if (b is Button)
{
b.BackgroundImage = WindowsApp1.Properties.Resources.BtnImg;
}
}
string temp = listbox1.SelectedItem.ToString();
mark c14 reputationPosted Jan 17, 2011, 6:36 PM EST
foreach (Control b in this.Controls & GroupBox1.Controls)
doesn't work?
FroglegRank #1,020 · 1.9K reputationPosted Jan 17, 2011, 7:20 PM EST
foreach (Control b in groupBox1.Controls)
{
if (b is Button)
{
b.BackgroundImage = ArrayCompare.Properties.Resources.BtnImg;
}
}