Event:Insert TextBox on RUN TIME By:Tanuj Kumar


Insert TextBox on RUN TIME

Insert TextBox on RUN TIME:-

Assignment1:
texbox on runtime

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace eventassignment1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int a, b=100, c=100;
        private void button1_Click(object sender, EventArgs e)
        {
           
            a = int.Parse(textBox1.Text);
            for (int i = 0; i < a; i++) {


                TextBox tb = new TextBox();
                this.Controls.Add(tb);
                tb.Location = new Point(b, c);
                b = b + 10;
                c = c + 10;
            }
        }
    }

}
Posted By:Tanuj Kumar 
On:Shareyourconscience
Event:Insert TextBox on RUN TIME By:Tanuj Kumar Event:Insert TextBox on RUN TIME By:Tanuj Kumar Reviewed by Tanuj on 1:19:00 am Rating: 5

No comments:

Powered by Blogger.