enter image description here this login system working perfect.. but i need to change path as default.. currently it'z save on ' C' drive .. can to save inside debug folder. is it possible ?
try
{
var sr = new System.IO.StreamReader("C:\\" + textBox1.Text + "\\login.ID");
username = sr.ReadLine();
password = sr.ReadLine();
sr.Close();
if (username == textBox1.Text && password == txtPass.Text)
{
MessageBox.Show("You are now successfully logged in |Welcome", "Success");
frmMainMenu frm = new frmMainMenu();
frm.Show();
this.Hide();
}
else
{
MessageBox.Show("User Name Or Password Wrong!", "Error");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}