Takže chcete z kódu nastavit obrázek na pozadí Plochy? K tomu je třeba použít P/Invoke, ajko například takto:
Imports System
Imports System.Runtime.InteropServices
Public Class Desktop
Public Shared SPI_SETDESKTOPWALLPAPER As Integer = 20
Public Shared SPIF_UPDATEINIFILE As Integer = 1
Public Shared SPIF_SENDWININICHANGE As Integer = 2
Public Shared Sub Main(ByVal args() As String)
If (args.Length = 1) Then
SystemParametersInfo(SPI_SETDESKTOPWALLPAPER, 0, args(0), _
(SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE))
End If
End Sub
Private Declare Sub SystemParametersInfo Lib "User32.dll" Alias "SystemParametersInfoA" (ByVal action As Integer, _
ByVal iparam As Integer, ByVal vparam As String, ByVal opt As Integer)
End Class
Kód pochází z fóra http://forums.devx.com/showthread.php?t=...
|