|
-
Sep 22nd, 2011, 04:38 PM
#1
Thread Starter
Hyperactive Member
Closing a Dialogue Using a Tick Event
I am working on a football simulation. I'm writing the code when a quarter or half ends.
If any of you ever played Madden Football you know that when the time reaches zero the play calling screen disappears. This is exactly what I am trying to do. The play calling screen in my case is a dialog controlled by the main game screen (the main form controlling most of the game). I use the .ShowDialog event to display it.
What I want to do is close this dialog on a tick event. I'm not sure how to access this dialog if it was created as a local variable. I assume it's like finding any other control that was dynamically generated at run-time but I can't wrap my head around the proper syntax. Once I get the dialog in the tick event I want the dialog to close and return all control to the main game screen.
I've never tried to close a dialog without the user clicking a button on the dialog itself. This is different because the parent control is closing the dialog with its own event (Tick).
I hope I explained this well! 
Thanks
Intermediate Level Programmer Extraordinaire 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|