public static void setButtons(Form f) { foreach (Control c in f.Controls) { Button btn = c as Button; if (c == btn) { System.Media.SystemSounds.Beep.Play(); } } }
public static void setButtons(Form f) { foreach (Control c in f.Controls) { Button btn = c as Button; if (c == btn) { btn.Click += btn_Click; } } } static void btn_Click(object sender, EventArgs e) { System.Media.SystemSounds.Beep.Play(); }
InvokeRequired
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)