c# drawing multiple screens on a form
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: c# drawing multiple screens on a form

Hybrid View

  1. #1
    Join Date
    May 2013
    Posts
    5

    c# drawing multiple screens on a form

    I'm trying to create a program that draws a rectangle on a specific area, well basically on the entire screen size of the user.

    If you have two 1080p monitors the form size should be:
    3840x2160

    I already have this working and my Form maximizes across both of my screens.

    -------------

    But now the actual problem, whenever I setup so that my program uses all screens it somehow draws in the incorrect location. If I use a single screen this doesn't happen.
    If I click on a certain point 920,590 then the start position of the rectangle will somehow be -920,-590 even though it prints out 920,590 in a messagebox. When I use a single screen it draws the rectangle perfectly fine..

    BTW: I have two screens and the rectangle gets drawn on the LEFT screen(negative coordinates) while I click on the RIGHT screen..

  2. #2
    Join Date
    May 2013
    Posts
    5

    Re: c# drawing multiple screens on a form

    Sorry i ment 3840x1080

  3. #3
    Join Date
    May 2013
    Posts
    5

    Re: c# drawing multiple screens on a form

    Fixed it.

    Instead of using the Cursor.Position.* on the Mouse_Down event I used MouseEventArgs.*
    The Cursor.Position is global while the other is local position on the form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center