Your decision makes sense.
You can change the f: om C # background with the following code, but it only works with .bmp image types:
[DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern Int32 SystemParametersInfo(UInt32 uiAction, UInt32 uiParam, String pvParam, UInt32 fWinIni); private static UInt32 SPI_SETDESKWALLPAPER = 20; private static UInt32 SPIF_UPDATEINIFILE = 0x1; private String imageFileName = "c:\\sample.bmp"; public void SetImage( string filename ) { SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, filename, SPIF_UPDATEINIFILE); }
For information on creating .bmp at runtime, you can read this forum post .
source share