(Solved) – VB.NET Set desktop wallpaper from my.resources

(solved)-–-vbnet-set-desktop-wallpaper-from-my.resources

i really need help
How i can set a desktop wallpaper but from My.resources?

i used this:

 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



Private Const SETDESKWALLPAPER = 20
Private Const UPDATEINIFILE = &H1


Dim Location As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Dim Picturebox1 = New PictureBox


    Location = My.Resources.Image


    SystemParametersInfo(SETDESKWALLPAPER, 0, Location, UPDATEINIFILE)
End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *