Answers for "forms as a button"

0

html form button

<button type="submit" form="form1" value="Submit">Submit</button>

<!-- OR YOU CAN DO -->

<input type="submit" value="Submit">

<!-- OR YOU CAN DO -->

<input type="button" value="Submit">
Posted by: Guest on May-17-2021
0

how to add new button to form

private void Form1_Load(object sender, EventArgs e)
    {
        Button testbutton = new Button();
        testbutton.Text = "button1";
        testbutton.Location = new Point(70, 70);
        testbutton.Size = new Size(100, 100);
        testbutton.Visible = true;
        testbutton.BringToFront();
        this.Controls.Add(testbutton);

    }
Posted by: Guest on April-27-2022

Browse Popular Code Answers by Language