I posed a similar question a few months back but I did not get the responds that I was looking. Is there a way to implement a timeout feature in WinForm? What I am trying to accomplish is to display a form for about 5 seconds and then have the form close by itself without user intervention so that it may continue running the program. I read an articles at the following address: https://social.msdn.microsoft.com/Forums/vstudio/en-US/719cb7c9-afad-4d88-968d-2be7b4da0e39/how-to-implement-a-timeout-feature-in-windows-forms?forum=winforms
But it pertains to C#. Any ideas on how to achieve this in managed COBOL? I tried doing the following in the ‘Activate’ event of my form:
method-id TPS0021J_Activated final private.
procedure division using by value sender as object e as type System.EventArgs.
invoke type System.Threading.Thread::Sleep(3000)
This block of code gets executed whenever the form is activated. This works if I ‘Step Into’ the program but it doesn’t work if I run it without any break points. If I can get this block of code to work when I run the program without breakpoints then it will solve my problem.