Remove desktop wallpaper in c sharp

C# Program to remove desktop wallpaper



using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Shell32; //"Microsoft Shell Control And Automation"
using System.Runtime.InteropServices;

namespace ConsoleApplication1
{
class Program
{
[
DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern Int32 SystemParametersInfo(UInt32 action, UInt32 uParam, String vParam, UInt32 winIni);
private static readonly UInt32 SPI_SETDESKWALLPAPER = 0x14;
private static readonly UInt32 SPIF_UPDATEINIFILE = 0x01;
private static readonly UInt32 SPIF_SENDWININICHANGE = 0x02;

static void Main(string[] args)
{
string path = "";

SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, path, SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE);

}
}
}

hide windows taskbar in c#

Hide windows taskbar  C# Program

 public static extern int FindWindow(string lpClassName, string lpWindowName);
[DllImport("User32.dll")]

public static extern Int32 SendMessage(

int hWnd, // handle to destination window

int Msg, // message

int wParam, // first message parameter

int lParam); // second message parameter

private void Form1_Load(object sender, EventArgs e)

{

Process p = new Process();

p.StartInfo.WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.System);

p.StartInfo.FileName = "taskmgr.exe";

p.StartInfo.CreateNoWindow = true;

p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

p.Start();

}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)

{

const int WM_CLOSE = 0x0010;

int taskManager = FindWindow("#32770", "Windows Task Manager");

SendMessage(taskManager, WM_CLOSE, 0, 0);

}