![]() I use this code but in VB.net, try to convert it to C#;) Private Declare Function SystemParametersInfo Lib 'user32' Alias 'SystemParametersInfoA' (ByVal uAction As Integer, ByVal uParam As Integer, ByVal lpvParam As Integer, ByVal fuWinIni As Integer) As Integer Public Function ToggleScreenSaverActive(ByRef Active As Boolean) As Boolean Dim lActiveFlag As Integer Dim retvaL As Integer lActiveFlag = IIf(Active, 1, 0) retvaL = SystemParametersInfo(17, lActiveFlag, 0, 0) ToggleScreenSaverActive = retvaL > 0 End Function ' On ToggleScreenSaverActive(True) ' Off ToggleScreenSaverActive(False). Sep 24, 2015. The good news is that you really only need to support the /s option to create the simplest possible screensaver. Start a new C# Console project called ScreenSaver1. This provides you with the initial code you need, i.e. A main function that is run when the application starts. The main function receives the. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2018
Categories |