private void photo_Click(object sender, EventArgs e) { var photo = sender as PictureBox; user_id = int.Parse(photo.Name); profile = true; postb.profile = false; userMenu usMn = new userMenu(); usMn.Show(); }
//a function for lable click private void uname_Click(object sender, EventArgs e) { var button = sender as Label; user_id = int.Parse(button.Name); profile = true; postb.profile = false; userMenu usMn = new userMenu(); usMn.Show(); }