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

  • SEARCH
  • Home
  • 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

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer SELECT User FROM MyTable WHERE MyDate = (SELECT MAX(MyDate) FROM… May 12, 2026 at 1:15 am
  • Editorial Team
    Editorial Team added an answer Logging has had a few major updates recently in the… May 12, 2026 at 1:15 am
  • Editorial Team
    Editorial Team added an answer Reducing the size of the page just reduces the size… May 12, 2026 at 1:15 am

Related Questions

Im making a small python script to upload files on the net. The script
I'm making a simple 2 player game in XNA and started looking into saving
I'm making a simple scheduler with C# in .Net. All it does is execute
I'm making a simple 2D game for the iPhone. It's based on CrashLanding. so

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.