-
May 24th, 2013, 09:46 AM
#1
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..
-
May 24th, 2013, 02:49 PM
#2
Re: c# drawing multiple screens on a form
-
May 24th, 2013, 05:13 PM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|