Get X,Y coordinates from inside the DrawingArea
Posted
#1
(In Topic #1235)
Trainee
I tried using the `DrawingArea_MouseDown` event:
However, I instead get the error:
Null object
Is what I'm after possible? If yes, how?
Posted
Trainee
Posted
Guru

ak2766 said
You got it.
for any control Mouse event like MouseDown / MouseMove, Mouse.X and Mouse.Y are relative to the control contents (0,0 being top left)
From outside of a controls mouse event you will find Mouse.X and Mouse.Y give a "no mouse data" error but then you can use the screen alternatives.
Control.Cursor is for setting the cursor image
Ie.
DrawingArea1.Cursor = Cursor.CrossHair will make the cursor be a crosshair
DrawingArea1.Cursor = Cursor.Default will use the default
Posted
Guru

Posted
Trainee
Really getting to know GAMBAS now -
1 guest and 0 members have just viewed this.



