Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do somethong after ShowDialog

Status
Not open for further replies.

wallaceoc80

Programmer
Jul 7, 2004
182
GB
Hi,

I have a form that I am showing using the ShowDialog method. However, I want to acess the value of one of the selectors on the form after I call the ShowDialog but I can't.

Is there any event that I can use that is fired by the ShowDialog or is there any other way I can use to get at teh value I need?

Thanks,

Wallace
 
ShowDialog is going to block execution until the user closes the form. If you need to do some background processing, you could try raising an event somewhere appropriate to respond to user input on the dialog form.

Brian Begy
BugSentry - Automatic error reporting for .NET and COM
 
Or you could use delegates. Create a delegate for the ShowDialog and use BeginInvoke/EndInvoke in order to asynchronously show the dialog.
 
What exactly are you trying to do? You can access all values on the form after creating a new instance and then showing it. After the dialog has closed you can still access all (changed) values untill you dispose it...

Regards, Ruffnekk
---
Is it true that cannibals don't eat clowns because they taste funny?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top