|
-
Jul 4th, 2004, 01:55 PM
#1
Thread Starter
New Member
(Resolved) Emulate a key-press for screen-saver disabling...
Hi all.
I'm trying to bypass the Sarbanes/Oxley requirement of having a screensaver come up every 15 minutes (for my Operators). They have 4 large screens that must be monitored quite often, and they want to know if a program could be created that would emulate pressing the 'Shift' key every 10 minutes or so... so as to stop the screen saver from ever coming up (and no, I can't just disable the screen saver... it's locked down in the profile on the server).
Would I use a similar code snippet to something like this...
Private Sub InitializeTimer()
' Set to 1 second.
Timer1.Interval = 600000
' Enable timer.
Timer1.Enabled = True
Button1.Text = "Enabled"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = "Stop" Then
Button1.Text = "Start"
Timer1.Enabled = False
Else
Button1.Text = "Stop"
Timer1.Enabled = True
SendKeys.Send(Keys.ShiftKey)
End If
End Sub
If so, I appear to be missing something, as it's not working. :-(
Any help would be greatly appreciated. Thanks...
-Michael
Last edited by tektrader; Jul 7th, 2004 at 06:21 AM.
-
Jul 4th, 2004, 03:20 PM
#2
Thread Starter
New Member
Can anyone help? I know it's probably a newbie question, but I'm stumped. *sigh* Even just a quick "look here, jerk" would do.
-
Jul 4th, 2004, 05:52 PM
#3
PowerPoster
To send the shift key you need:
SendKeys.Send("+")
-
Jul 5th, 2004, 06:55 AM
#4
Thread Starter
New Member
Originally posted by SuperSparks
To send the shift key you need:
SendKeys.Send("+")
So my code is write, I just need to replace my SendKeys part with yours? If so, that didn't seem to work.
I sincerely appreciate the help though...
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
|