| | | Forum Newbie
       
Group: Forum Members Last Login: 10/30/2008 10:50:41 AM Posts: 1, Visits: 7 |
| | Hi all, First time posting so be gentle! I have a form with a button and when the user clicks the button it calls an external API function, which opens another form which requires user input. I want to close my form, but if I try to close it straight away, it closes the external form too before the user has had a chance to input the relevant details. Therefore I need a way to wait for that process to finish, before carrying on executing the rest of my code (to close my form). I found the System.Diagnostics.Process class (with WaitForExit) but it seems to only work with external programs, not API calls. There must be a really simple way of doing it but I'm just missing it. Thanks, Dan |
| | | | Junior Member
       
Group: Forum Members Last Login: 11/10/2008 10:28:14 AM Posts: 13, Visits: 10 |
| this typically depends on the API call, since it appears it runs on its own thread and passes back control to you immediately, you would be looking for a .join method or wait for finish method exposed by that api. i don't know of another way. Alternatively if there is a ShowDialog instead of just Show exposed, that would do the trick also.
Vb.net 2005, Teradata, Sql Server 2005, mainframe automation |
| |
|
|