C# |
Thanks in advance. =)
C# |
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sam HobbsRank #107 · 20.5K reputationPosted Nov 10, 2010, 7:23 PM EST
Manikavelu VelayuthamRank #413 · 6K reputationPosted Nov 10, 2010, 7:25 PM EST
{
Control ctl = new Control();
if (Isbutton!=true)
ctl = new Label();
else
ctl = new Button();
ctl.Name = Text;
ctl.Text = Text;
ctl.Location = Location;
ctl.Size = Size;
this.Controls.Add(ctl);
}
Jason Akkerman9 reputationPosted Nov 10, 2010, 7:46 PM EST
addControl("TEST", new Point(450, 10), new Size(100, 25), new Button());
private void addControl(string Text, Point Location, Size Size, Control C)
{
C.Name = Text;
C.Text = Text;
C.Location = Location;
C.Size = Size;
this.Controls.Add(C);
}
Sam HobbsRank #107 · 20.5K reputationPosted Nov 10, 2010, 8:55 PM EST