LabVIEW启用/禁用Windows屏幕保护程序
此VI使用LabVIEW中的Windows注册表功能将值写入ScreenSaveActiveKey。VI在Windows注册表中打开对桌面子键的引用,然后根据用户推送屏幕保护程序控件提供的布尔值将值写入屏幕保存活动键。最后,VI关闭Windows注册表中的桌面子键。
要求
LabVIEW完整开发系统2012或兼容产品
实现或执行代码的步骤
将前面板上的切换开关切换为启用或禁用Windows屏幕保护程序
单击“应用”按钮将设置保存到注册表
Description
This VIuses the Windows Registry functions in LabVIEW to write values to the ScreenSaveActiveKey. The VI opens a reference to the Desktop sub key in the Windows registry,then write values to the ScreenSaveActive Key according to the boolean valueprovided by the user pushing theScreensaver Control. Finally, the VI closes the desktop sub key in the Windowsregistry
Requirements
LabVIEWFull Development System 2012 or compatible
Steps toImplement or Execute Code
Switchthe toggle on the Front Panel to either Enabled or Disable Windows Screensaver
Click theApply button to save the setting to the Registry
Introduction
PreventScreensave
ThisVI will prevent your screensaver from activating without disabling thescreensaver. It does this by setting thefocus on different windows and sending them an arbitrary keystroke.
Stepsto Complete
需要说明的是,上述的例程和文档,都是可以下载的,双击即可打开,其中压缩文件是可以采用粘贴复制的方式,拷贝到硬盘上。这不是图片,各位小伙伴看到后尝试一下,这个问题就不用加微信咨询了。有关LabVIEW编程、LabVIEW开发等相关项目,可联系们。附件中的资料这里无法上传,可去公司网站搜索下载。
LabVIEW程序,如下附件所示。