简体   繁体   中英

C# Pass Values from Modeless Form

I am currently in the process of changing my modal form to modeless. The modal form was at the beginning of a method and I utilized the values within the form in this method. Now that I'm changing it to modeless, I have it set to open the form, then in the closed event I call that method. But my problem is, how do I retrieve the values from the form? Since it's closed, I can't use the simple form.Value like I was when the dialog was modal.

Thanks so much!

Subscribe to the 'FormClosing' event and save the data from the form.
I'm fairly certain the 'FormClosing' is the event you need because
The form is not yet disposed when you reach this event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM