Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Starting a Windows XP Screen Saver from LabWindows/CVI

Primary Software: LabWindows/CVI Development Systems>>Full Development System
Primary Software Version: 8.5
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
How can I start a Windows XP screen saver from my LabWindows/CVI application?

Solution:
You can start a Windows XP screen saver by calling LaunchExecutable with the screen saver file path:
LaunchExecutable ("C:\\WINDOWS\\system32\\yourScreenSaver.scr //s");

The "/s" command-line option executes the screen saver. If omitted, the screen saver settings dialog box is presented on the screen. See this MSDN article for more details.

If you want to activate the defined screen saver in the system instead of a fixed one, you need to retrieve first the path to the screen saver executable from the registry:
RegReadString (REGKEY_HKCU, "Control Panel\\Desktop", "SCRNSAVE.EXE", file, MAX_PATHNAME_LEN, &stringSize);

Related Links:

Attachments:





Report Date: 10/11/2007
Last Updated: 10/12/2007
Document ID: 4EAEA2SN

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit