Esempio n. 1
0
 public static void AddControlTo(Control parent, Control child)
 {
     if (parent.InvokeRequired)
     {
         AddControlToDelegate msgCallback = new AddControlToDelegate(WindowFormDelegate.AddControlTo);
         parent.Invoke(msgCallback, new object[] { parent, child });
     }
     else
     {
         parent.Controls.Add(child);
     }
 }
Esempio n. 2
0
 public static void AddControlTo(Control parent, Control child)
 {
     if (parent.InvokeRequired)
     {
         AddControlToDelegate msgCallback = new AddControlToDelegate(WindowFormDelegate.AddControlTo);
         parent.Invoke(msgCallback, new object[] { parent, child });
     }
     else
     {
         parent.Controls.Add(child);
     }
 }