<Runtime.InteropServices.DllImport("user32.dll", CharSet:=Runtime.InteropServices.CharSet.Auto)> _
Public Shared Function SystemParametersInfo(ByVal uAction As Integer, ByVal uParam As Integer, ByVal lpvParam As String, ByVal fuWinIni As Integer) As Integer
End Function
Public Sub definir_arriere_plan_bureau()
Dim odlg As New OpenFileDialog
odlg.Filter = "Images Bitmap (*.bmp,*.BMP)|*.BMP;*.BMP"
If odlg.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim filename As String = odlg.FileName
Dim subname As String
If filename.Length > 3 Then
subname = filename.Substring(filename.Length - 3, 3)
If subname = "bmp" OrElse subname = "BMP" Then
SystemParametersInfo(20, 0, filename, 1 Or 2)
'MessageBox.Show("L'image définie est désormais ","Bureau modifié"+System.Environment.UserDomainName);
Else
'MessageBox.Show("selectionner une image bitmap (.BMP) ","Attention..."); End If
End If
End If
End Sub