Click here to Skip to main content
15,305,625 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello am making project to calculate the students grade i need to transfer the data from form 1 to form 2 and when i came back to form 1 and entered form 2 again the data can shown how can i do that using class?!

What I have tried:

........................................................................................................................................................................
Posted
Updated 13-May-22 9:20am

1 solution

Exactly how depends on the "relationship" between the two forms.
Have a look at these, one of them will fit your circumstances.
The form that creates an instance of another:
C#
MyForm mf = new MyForm();
mf.Show();
Is the "parent", the other form is the "child".
(This doesn't imply any formal MDI relationship)

Transferring information between two forms, Part 1: Parent to Child[^]
Transferring information between two forms, Part 2: Child to Parent[^]
Transferring information between two forms, Part 3: Child to Child[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900