i'm having troubles when i'm trying to start the screensaver in Windows98!!!!
this is my code :
someone already told me to use the SPI_SCREENSAVERRUNNING variable, but it is still not working.Code:Declare Function SendMessage Lib "user32" _ Alias "SendMessageA" (ByVal hwnd As Long, ByVal _ wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Const WM_SYSCOMMAND As Long = &H112& Public Const SC_SCREENSAVE As Long = &HF140& Private Const SPI_SCREENSAVERRUNNING = 97& Function gf_StartScreenSaver() As Boolean Dim hwnd& Dim iNumber As Integer On Error Resume Next hwnd& = GetDesktopWindow() Call SendMessage(hwnd&, WM_SYSCOMMAND, SPI_SCREENSAVERRUNNING, 0&) iNumber = Err.Number gf_StartScreenSaver = (Err.Number = 0) If iNumber = 0 Then boScreenSaverStarted = True End Function
who knows what i have to do????




Reply With Quote