This code here works on my Win98 machine and only is a screen saver is running, not Standby. I guess this is not the full answer to your question, but it is a start.

.bas Module Code:
Code:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Function IsSNRunning() As Boolean
    If FindWindow("WindowsScreenSaverClass", vbNullString) <> 0 Then
        IsSNRunning = True ' Screen Saver Is Running
    Else
        IsSNRunning = False ' Screen Saver Is Not Running
    End If
End Function
Form Code:
Code:
Private Sub Timer1_Timer() ' Interval = 1
    If IsSNRunning Then
        'Screen Saver Is Running
        'Do Something Here
    End If
End Sub
Hope this helps at least a little bit!

------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer


[This message has been edited by Compwiz (edited 11-11-1999).]