| |

VerySource

 Forgot password?
 Register
Search
View: 1021|Reply: 5

How does Form1 get the closed state of Form2?

[Copy link]

2

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-19 10:40:01
| Show all posts |Read mode
How does the form transfer status
Reply

Use magic Report

0

Threads

15

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-26 11:09:02
| Show all posts
You can set a property in the class, set the property value when the form is loaded, and close, and the form1 get property value can know the status of form2
Reply

Use magic Report

0

Threads

27

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-1-26 16:27:01
| Show all posts
The solution is upstairs.
Reply

Use magic Report

0

Threads

56

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-2-6 16:30:01
| Show all posts
correct.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-2 18:00:01
| Show all posts
Learning ing .....
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-1 20:15:01
| Show all posts
If FORM1 wants to know when and why FORM2 is closed, you can delegate the FormClosed event of FORM2

            Form2 f = new Form2();
            f.FormClosed += new FormClosedEventHandler( f_FormClosed );
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list