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 502503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:17:53+00:00 2026-05-13T06:17:53+00:00

I have a simple screensaver that I’ve written, which has been deployed to all

  • 0

I have a simple screensaver that I’ve written, which has been deployed to all of our company’s client PCs.

As most of our PCs have dual monitors, I took care to ensure that the screensaver ran on both displays.

This works fine, however on some systems, where the primary screen has been swapped (to the left monitor), the screensaver only works on the left (primary) screen.

The offending code is below. Can anyone see anything I’ve done wrong, or a better way of handling this?

For info, the context of “this”, is the screensaver form itself.

// Make form full screen and on top of all other forms

int minY = 0;
int maxY = 0;
int maxX = 0;
int minX = 0;

foreach (Screen screen in Screen.AllScreens)
{
    // Find the bounds of all screens attached to the system

    if (screen.Bounds.Left < minX)
        minX = screen.Bounds.Left;

    if (screen.Bounds.Width > maxX)
        maxX = screen.Bounds.Width;

    if (screen.Bounds.Bottom < minY)
        minY = screen.Bounds.Bottom;

    if (screen.Bounds.Height > maxY)
        maxY = screen.Bounds.Height;
}

// Set the location and size of the form, so that it
// fills the bounds of all screens attached to the system

Location = new Point(minX, minY);
Height = maxY - minY;
Width = maxX - minX;
Cursor.Hide();
TopMost = true;
  • 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-13T06:17:53+00:00Added an answer on May 13, 2026 at 6:17 am

    You want to check screen.Bounds.Right rather than screen.Bounds.Width.

    Similarly for height.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple remoting API that has method similar to this: bool FillMyList(List<string> ListToFill)
Should simple JavaBeans that have only simple getters and setters be unit tested?? What
I have a simple webform that will allow unauthenticated users to input their information,
I have a simple 2-column layout with a footer that clears both the right
I have a simple little test app written in Flex 3 (MXML and some
Should have been simple I would have thought. I want to force the PC
Have simple C# console app which imports text data into SQL. It takes around
I have simple web application called App that is secured with Windows Authentication. I
I have simple regex \.*\ for me its says select everything between and ,
Ok, i have simple scenario: have two pages: login and welcome pages. im using

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.