Exemplo 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);
     }
 }
Exemplo 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);
     }
 }