Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 244049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:58:21+00:00 2026-05-11T20:58:21+00:00

Im making a simple wallpaper changer. It works when changing the wallpaper but i

  • 0

Im making a simple wallpaper changer. It works when changing the wallpaper but i cant change the pattern of the wallpaper. I tried something like this but it doesnt work :S

SystemParametersInfo(SPI_SETDESKPATTERN, 0, "Center",
SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE);

Can some1 please show me the proper way of setting the wallpaper pattern?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:58:21+00:00Added an answer on May 11, 2026 at 8:58 pm

    I assume you mean the centred/ streched / tiled setting that would be the second past value int 1-3

    [DllImport("user32.dll", CharSet = CharSet.Auto)]
            private static extern Int32 SystemParametersInfo(UInt32 action, UInt32 uParam, String vParam, UInt32 winIni);
            private static readonly UInt32 SPI_SETDESKWALLPAPER = 0x14;
            private static readonly UInt32 SPIF_UPDATEINIFILE = 0x01;
            private static readonly UInt32 SPIF_SENDWININICHANGE = 0x02;
    
            private void SetWallpaper(string path)
            {
                if (File.Exists(path))
                {
                    Image imgInFile = Image.FromFile(path);
                    try
                    {
                        imgInFile.Save(SaveFile, ImageFormat.Bmp);
                        SystemParametersInfo(SPI_SETDESKWALLPAPER, 3, SaveFile, SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE);
                    }
                    catch
                    {
                        MessageBox.Show("error in setting the wallpaper");
                    }
                    finally
                    {
                        imgInFile.Dispose();
                    }
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple URL request with code like this: URL url = new
I am making simple grid like game ( grid is matrix 128x128) and matrix
I am making simple graphical game in WinForms and currently I would like to
I'm following up Sencha touch tutorial and making simple Tabbar. But the layout of
I am making a simple select from mySQL using PHP. I am doing something
I'm making a simple application/wallpaper, that adds simple water ripple effect to background image.
Making a simple map app, plan on adding buttons to mark specific locations But
How to change sizes of ViewController? I'm making simple app which uses deliberately two
Im making a simple proof of concept page with jQuery: $('.notclicked').click(function() { $(this).addClass(clicked); $(this).removeClass(notclicked);
Im making a simple tower defense game, I would like any wave of units

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.