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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T19:56:59+00:00 2026-05-16T19:56:59+00:00

In a C# winform application running in a multimonitor environment (desktop is stretched across

  • 0

In a C# winform application running in a multimonitor environment (desktop is stretched across 2 or 3 monitors), the Location property of a Form represents the location of the form on the spanned desktop instead of the location of the form on the physical screen. Is there an easy way to find the Location of the form in screen coordinates, for the screen that the form is on? So if the form is in the top left corner of the 2nd or 3rd display, the location would be (0,0)?

  • 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-16T19:57:00+00:00Added an answer on May 16, 2026 at 7:57 pm
    /// <summary>Returns the location of the form relative to the top-left corner
    /// of the screen that contains the top-left corner of the form, or null if the
    /// top-left corner of the form is off-screen.</summary>
    public Point? GetLocationWithinScreen(Form form)
    {
        foreach (Screen screen in Screen.AllScreens)
            if (screen.Bounds.Contains(form.Location))
                return new Point(form.Location.X - screen.Bounds.Left,
                                 form.Location.Y - screen.Bounds.Top);
    
        return null;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have to capture screenshot of Desktop after every one second. in Winform application
Hi, We have a WinForm application running och Windows. This application offers extended logging
Possible Duplicate: C# WinForm Application - UI Hangs during Long-Running Operation I created a
I am running code coverage using VS 2010. This is a winform application. In
My company has an existing established WinForm application which in running on WinXP. The
I am trying to automate testing of a winform application. I am running it
In my application I am running the same winform in different contexts to control
I've come across such a situation. WinForms application has two forms. The main form
My winform application is launched by another application (the parent), I need determine the
In winform application, how do I give a different (different from the blue one)

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.