Set Desktop WallPaper Using C#

.Net
framework doesn't provide any class to set Desktop wallpaper by itself but is
it very possible to set image using C# with the help of Platform Invocation
Servicesby using SystemParametersInfo function.

Take a Look how we will accomplish this task

We are going to use Platform
Invocation Services , so we need to access System.Runtime.InteropServices
namespace without using it we can accomplish this task

So we need to add this out program as

using System.Runtime.InteropServices;

after that

The SystemParametersInfo
is found in the user32 API. To provide access to it, create a class
named "SetDWallpaper " and
add the following declaration to the class: having Syntax like