I created a two forms loginform
and mainform
the login form is my startup program which validate if the username and password is correct then it will open the main form but the problem is after the main form is open the login form is still at the back of main form.
In my btnSubmit_Click
in my loginform
I tried different command this.Hide()
, this.Close()
, this.Disposed()
, also in mainform on load I also execute these commands to close the loginform
but no luck still it is there, I cannot move it or close it manually.
loginform
is my startup program.
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmLog());
}
Please help me with this problem.