Windows API are the dlls that are the part of microsoft windows operation system
There are many task in the application development that
are very difficult to handle in your own code for example if we have need to
change background of your desktop via your application than what you do? Simple
you can use User32 windows api for that. .Net framework use plateform invocation
services for it.plateform invocation services is the process by which .net
framework communicate unmanaged code of api.
In this article we will discuss how to use User32 windows api for set the
background of desktop
or desktop wallpaper.
First design windows form
like this:

User32 dll has a function 'SystemParametersInfo', and we
can use this function for set and get all the settings controlled by the Windows
Control Panel.
Normally a user would have to choose the Windows Control Panel to view or
change system settings such as granularity, wallpaper, or icon title wrap. And
we will use this function for set the desktop background…
Code:
Define function SystemParametersInfo:
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Integer, ByVal uParam As Integer, ByVal lpvParam As String, ByVal fuWinIni As Integer) As Integer
'Declare two constant
Private Const SETDESKWALLPAPER = 20

Join the conversation! Your thoughts help the community grow.