Click to See Complete Forum and Search --> : Screencapture over network
cnjmorris
May 15th, 2001, 01:53 AM
Okay I have a program that will screen capture someone else on my network (program running on their machine) every 10 minutes and save the image to a directory on my computer.
I have one problem, if there screen saver is on, it will produce an error.
How should I handle this?
Disable screen saver?
How do I know if screen saver is active?
___________________________________________
Also, is there a way to know if a certain application is running? For instance, send me a screen capture if Word 97 is open.
Iouri
May 15th, 2001, 07:15 AM
Disable screen saver?
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Long, ByVal fuWinIni As Long) As Long
Private Const SPI_SETSCREENSAVEACTIVE = 17
Private Sub cmdDisabled_Click()
ToggleScreenSaverActive (False)
cmdEnabled.Enabled = True
cmdDisabled.Enabled = False
End Sub
Private Sub cmdEnabled_Click()
ToggleScreenSaverActive (True)
cmdEnabled.Enabled = False
cmdDisabled.Enabled = True
End Sub
Private Sub Form_Load()
cmdEnabled.Enabled = True
cmdEnabled.Enabled = False
End Sub
Public Function ToggleScreenSaverActive(Active As Boolean) As Boolean
Dim lActiveFlag As Long
Dim retvaL As Long
lActiveFlag = IIf(Active, 1, 0)
retvaL = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, lActiveFlag, 0, 0)
ToggleScreenSaverActive = retvaL > 0
End Function
Also, is there a way to know if a certain application is running? For instance, send me a screen capture if Word 97 is open.
You can find the window by window caption (or part of it). So you will check if word is active and do whatever you need.
Iouri Boutchkine
iouri@hotsheet.com
shree
May 15th, 2001, 11:24 AM
What method are you using to capture the screen?
If you use the
SendKeys "{PRTSC}"
to capture the screen, you'll get the snapshot even if a screensaver is running.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.