SetWallpaperOptions Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use the SetWallpaperOptions Win32 function in C# but I'm not
quite
sure how to do it. This is my section of code...

_win32._tagWALLPAPEROPT opts = new _win32._tagWALLPAPEROPT();
opts.dwStyle = _win32.WPSTYLE_TILE;
opts.dwSize = 0;
IActive.SetWallpaper(file, 0);
IActive.SetWallpaperOptions(ref opts, 0);
IActive.ApplyChanges(_win32.AD_APPLY_FORCE | _win32.AD_APPLY_SAVE |
_win32.AD_APPLY_REFRESH);

When I run this I get an error saying thay SetWallpaperOptions has an
invalid parameter but I can't figure out what the problem is. I'm using the
wrapper from http://www.geocities.com/dynamic_sysop/IActiveCsharp.htm which I
believe was originally created by Mattias Sjögren who was kind enough to help
me on here a while ago.

Any ideas?

Darrell
 
Back
Top