private void btnLogin_Click(object sender, EventArgs e)
        {
            if (validForm())
            {
                user = new User();
                if (user.login(txtUser.Text.ToString().ToLower(), txtPass.Text.ToString(), getIP()))
                {
                    if (chkRemember.Checked)
                    {
                        Settings.Default.username = txtUser.Text.ToString().ToLower();
                        Settings.Default.password = txtPass.Text.ToString();
                        Settings.Default.Save();
                    }
                    else
                    {
                        Settings.Default.username = "";
                        Settings.Default.password = "";
                        Settings.Default.Save();
                    }

                    frmStart form = new frmStart(user);
                    this.Visible = false;
                    form.Show();
                    this.Close();
                }
                else
                    lblError.Text = "There was an error while logging in";
            }
        }
 public frmEdit(string TempId, User user)
 {
     id = TempId;
     thisUser = user;
     InitializeComponent();
 }
 public frmUsers(User user)
 {
     thisUser = user;
     InitializeComponent();
 }
 public frmEditUser(User user, string id)
 {
     thisUser = user;
     SelectedId = id;
 }
 public frmCreate(User user)
 {
     InitializeComponent();
     thisUser = user;
 }
 public frmStart(User user)
 {
     InitializeComponent();
     thisUser = user;
 }
 public frmBrowse(User user)
 {
     thisUser = user;
     InitializeComponent();
 }