I have created a sample Login form in C# Windows Form Application and what I want is to add Remember username or password feature to my login form.
I just need to provid
I solved using that.
In you winforms project right click and go to properties, select settings and add name to store data (eg. userName and passUser)
So in you login form add a checkbox remember me.
In you button loggin check if checkbox true, save user and pass
if (checkRemember.Checked)
{
Properties.Settings.Default.userName = textBoxUserName.Text;
Properties.Settings.Default.passUser = textBoxUserPass.Text;
Properties.Settings.Default.Save();
}
In you load login form add this
if (Properties.Settings.Default.userName != string.Empty)
{
textBoxUserName.Text = Properties.Settings.Default.userName;
textBoxUserPass.Text = Properties.Settings.Default.passUser;
}
Regards.