-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
2,373 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Luna.Libs.Sys | ||
{ | ||
internal static class WinApis | ||
{ | ||
|
||
[DllImport("user32.dll", CharSet = CharSet.Unicode)] | ||
static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni); | ||
|
||
public static int SetWallpaper(string path) | ||
{ | ||
const int SPI_SETDESKWALLPAPER = 20; | ||
const int SPIF_UPDATEINIFILE = 0x01; | ||
const int SPIF_SENDWININICHANGE = 0x02; | ||
|
||
return SystemParametersInfo( | ||
SPI_SETDESKWALLPAPER, | ||
0, | ||
path, | ||
SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.