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!

showing form instead of screensaver

Status
Not open for further replies.

rembrechts

Programmer
Apr 10, 2002
11
BE
I've created an app that controls a machine. The operator can adjust some values, etc. When for some time he doesn't change anything, the app should show the overview page. Is there any way to do that without resetting a timer with every keypress or mousemove.
Maybe though the screensaver function of Windows.
The form displays and controls the start and stop, displaying error messages of the machine.

Can anyone help me?
 
You may only need to catch the Form_KeyDown and Form_MouseMove events, rather than look for every control.
You need to set KeyPreview =true for the form, of course. Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Nope It doesn't work, when I'm filling in a textbox, the form keydown event isn't triggered.
 
Are you sure that in Form_Load you have this:
Code:
KeyPreview = True
because my FormKeyDown event is triggered when I'm in a textbox (or anywhere else)

You can stick this in a form and watch the immediate window:
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Debug.Print KeyCode
End Sub
Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
rembrechts,
I bet you a star that you didn't read all of my first post! Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top