Friends,
I made a small calculator in a form.It works well. On the form there is an Exit Button to close the form.
Now I want this task.If I keep the calculator on the form (Computer) idle for 60 seconds the form must be closed automatically / If I goes on clicking some or other button on the calculator the form should not be closed (until 60 seconds completed after the last button click) Any body please help me. Thanks in advance

Recommended Answers

All 2 Replies

Thank you..But I tried like this

Private Sub Timer1_Timer()
Static i As Integer
  If i = 20 Then Exiting
  i = i + 1
End Sub

The interval of the timer is 500. Ok it works only when the form is opened and kept idle for more than 5 seconds(without clicking any buttons). If we click any button ,and even if we keep the computer idle for a long time the form is not exited.I want the form to exit after 5 seconds after the last button click.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.