can anyone help me...
the problem is that i want to hide a form when i click the button log out and show the log in form since you just log out and not close the form. but it does not happen...
here's my code...
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;
using System.Threading.Tasks;
namespace WindowsFormsApplication3pmp
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult msgbox = new DialogResult();
MessageBox.Show("Are you sure you want to Log out?", "Log Out", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
{
if (msgbox == System.Windows.Forms.DialogResult.Yes)
{
this.Hide();
new LogIn ().Show();
}
else if (msgbox == System.Windows.Forms.DialogResult.No)
return;
}
}
}
}