private System.Windows.Forms.ToolTip ToolTip1;
private void PrepareTooltips()
{
ToolTip1 = new System.Windows.Forms.ToolTip();
foreach(Control ctrl in this.Controls)
{
if (ctrl is Button && ctrl.Tag is string)
{
ctrl.MouseHover += new EventHandler(delegate(Object o, EventArgs a)
{
var btn = (Control)o;
ToolTip1.SetToolTip(btn, btn.Tag.ToString());
});
}
}
}