Thanks Sergey! Looking at the code, I could see that they use the WinAPI function SystemParametersInfo. I had seen that but could never find out what the numeric constatnt was for the GetScreenSaver parameter. They used 16 and that is what I needed.
Thanks again.
Rodd
>Rodd,
>
>You can use
Disable/Enable Window's Screen Saver File #
9403 to check if screen saver is active before you show your form.
>
>>I've written a little program that will pop up a small form notifying me when new mail arrives. The window stays up for a few seconds and then gradually becomes more and more transparent until it fades away.
>>
>>The code works great as long as the screensaver is not active. If the screensaver is running when a new email arrives, then the form crashes.
>>
>>My form has the following code:
>>
><snip>