How to diable the screen saver from Vb5 
Author Message
 How to diable the screen saver from Vb5

Try the procedures below.

Regards - Jack Rasnick



Quote:
> Hi guys,
>    I want to add a feature to my application,that is, I don't want the
> windows' screen saver to be executed when my application is running and
the
> user doesn't do anything for a specied amount of time for the screen
saver
> to launch.
>    I think there must be some API calls through which I must check from my
> application wheather the screen saver is about to start and When it about
> start I should send a message to stop execute the screen saver. Thanks in
> advance

> vj,


Sub TurnOffScreenSaver()
Dim i As Integer

    'Determine if the screen saver is on
    i = SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0&, fScreenSaveWasOn,
0&)
    If fScreenSaveWasOn Then
        'Tell Windows to disable screen savers
        i = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, False, 0&, 0&)
    End If

End Sub

Sub TurnOnScreenSaver()
Dim i As Integer

    'First determine if the screen saver was on when this program was
IN_PROGRESS
    If fScreenSaveWasOn Then
        'Tell Windows to enable screen savers
        i = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, True, 0&, 0&)
    End If

End Sub



Sun, 31 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How to diable the screen saver from vb5

2. Screen Saver on top of Screen Saver problem

3. help making screen savers with vb5

4. Screen saver/Task Bar cripples my VB5 app.

5. VB5 screen saver bug

6. Hiding a form while a screen saver is active (VB5/NT4)

7. Windows 95 screen saver (VB5)

8. VB5 app doesn't refresh correctly when screen saver has finished

9. making screen savers with vb5

10. help making screen savers in vb5

11. Previewing in Screen Savers (VB5)

12. VB5 prob. w/screen saver not in VB4

 

 
Powered by phpBB® Forum Software