0

I have a project that contains several forms. I want to send data from my first form to third form. My first form is login screen. Second is menu and third is change user password. When user logs in with his username and password, my second form appears. So, I want to send username from first form to third form as string. I want do this for get user's username and send query to my database to change users password. Please help me.

enginear
  • 29
  • 2
  • 9
  • what code have you attempted?? if you haven't attempted anything then search over the site? There's is a lot of answers to the question "how to pass data between forms". – Ousmane D. Mar 17 '17 at 22:32

1 Answers1

0

You can use one of the following ways to pass data between forms:

  • Public Property
    public GetData{get=>field;set=>field=value;}
  • Public method
    public void GetData{field=value;}
  • Using Constructor
    public MyClass(int value) {this.field = value;}
Ahmed Essawy
  • 326
  • 4
  • 13