0
How do I make the main form created by Visual Studio invisible after opening another one? I tried to use the "Hide();" command, but I was unsuccessful.
code :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }
    private void button1_Click(object sender, EventArgs e)
    {
        Form2 f = new Form2();
        f.Show();
        // no caso ao abrir o Form2, o Form1 ficar invisivel.
    }
}
}
Here too, I forgot I had to use "this"
– Jhonatas Flor de Sousa