CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    May 1999
    Posts
    34

    Post deleted by Marc Howe


  2. #2
    Join Date
    Apr 1999
    Posts
    1

    Re: Execute Screen Saver

    A screen saver is nothing but a ".exe" file renamed as a ".scr" file. To start the SS just run the ".scr" file with /s as the command line parameter. without any command line parameter, the SS configure dialog comes up.
    even the OS calls the SS using these command line parameters.


  3. #3
    Guest

    Re: Execute Screen Saver

    Hello,

    I don't know where you can found the current screen saver ( It's may in win.ini, system.ini, or Regedit ) but i know that screen saver are .exe that are rename in .scr so you can execute it with shellexecute or a fonction like that.

    Arnaud,
    At : [email protected]


  4. #4
    Join Date
    May 1999
    Posts
    34

    Re: Execute Screen Saver

    Thank you for the replies...Sorry I wasn't more specific, but I'm looking for a Win API or system call that can execute the user's current screen saver so that I don't have to try to figure out which screen saver the user has enabled.


  5. #5
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: Execute Screen Saver

    To invoke the currently selected screen saver, call CWnd::OnSysCommand() with the first parameter as SC_SCREENSAVE.

    sally


  6. #6
    Guest

    Re: Execute Screen Saver

    Try the following in the InitInstance of a Win32 application.

    CDialog dlg;
    dlg.Create(IDD_LAUNCHSS_DIALOG);
    dlg.SendMessage(WM_SYSCOMMAND, SC_SCREENSAVE);
    dlg.DestroyWindow();

    As long as a dialog resource exists within the application that is identified
    by IDD_LAUNCHSS_DIALOG, the user's presently defined screen saver is fired off.



  7. #7
    Join Date
    May 1999
    Posts
    34

    Re: Execute Screen Saver

    Thank you ANONYMOUS!!
    IT WORKS!!!
    I couldn't (& didn't) use it in the InitInstance routine, but I used it in the button's function and it works wonderfully.
    I'm just a beginner, as you can probably tell...
    Thanks again!
    And thank you to all who answered!!
    Marc


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured