1

Good day everyone.

I know how to set a wallpaper declaring

[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni);

and then using

SystemParametersInfo(0x0014, 0, file, 0x01 | 0x02);

but this sets the wallpaper, the same wallpaper on all the screens.

Is there any way to select which screen I want to update?

Oiproks
  • 764
  • 1
  • 9
  • 34

1 Answers1

1

I sueggest you to read that article, to understand how the background works with double monitor. You not need to put 2 image in 2 diffente monitors but you need to create one that contains both images and put as backgroud.

An extract of the article linked:

The trick is to set your wallpaper to “tile” rather than “center” or “stretch”. When the window manager draws a tiled bitmap, it places the tiles so that the upper left corner of the primary monitor exactly coincides with the top left corner of a tile. The remaining tiles are then arranged around that anchor tile.

Legion
  • 760
  • 6
  • 23
  • This is nice. Thanks. – Oiproks May 06 '19 at 08:33
  • So this basically means you need to create a grid with the monitors exactly placed as how the monitors are ordered in the display settings in Windows... Is there a plugin for this? – Michiel May 01 '23 at 15:03