I have wrote this code to change the desktop background using the function SystemParametersInfo in the Windows API user32.dll
:
Imports System.IO
Public Class Form1
Private Declare Auto Function SystemParametersInfo Lib "user32.dll" (ByVal X As Integer, ByVal Y As Integer, ByVal Z As String, ByVal W As Integer) As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
SystemParametersInfo(20, 0, Application.StartupPath & "\Frames\animation" & FrameX & ".png", 1 Or 2)
Catch ex As Exception : End Try
End Sub
End Class
What I need to know if I can change the picture position of that desktop background - the same property when changing the background from the Control Panel
- as shown below :
UPDATE : I found the right solution here.