MouseDown event(door).How get x and y?

Byak@

Active Member
Licensed User
i'm try
B4X:
sub evdown_NewEvent
obj.value=evdown.data
x=obj.getProperty("X")
msgbox(x)
but have error.and
B4X:
sub evdown_NewEvent
obj.value=evdown.data
obj.value=obg.GetProperty("Position")
x=obj.getProperty("X")
msgbox(x)
too
 

Byak@

Active Member
Licensed User
ooops)i'm want to say 'MouseEnter' event.with 'MouseDown' this code work fine.
control-Image (PIctureBox)
i'm set this event 'eventer.new1(obj.value,"MouseEnter")'
this event fired ok,but i can't get a X and Y.Error: "Object reference not set to intstance of an object"
 

klaus

Expert
Licensed User
Longtime User
You must be aware that the MouseEnter, MouseHover and MouseLeave events are only available on the desktop.
You can get the x and y coordinates of the mouse with the MouseMove event after the MouseEnter event.

Attached a small program to play with.

Best regards.
 

Attachments

  • MouseEnter.sbp
    2.7 KB · Views: 237

mjcoon

Well-Known Member
Licensed User
You must be aware that the MouseEnter, MouseHover and MouseLeave events are only available on the desktop.

Reasonable when using a stylus whose position can only be detected by the device when it is "down", that is, touching the screen already!

Mike.
 

klaus

Expert
Licensed User
Longtime User
Hi Mike,
Reasonable when using a stylus whose position can only be detected by the device when it is "down", that is, touching the screen already!
I agree with you, but sometimes the 'most' evident things are overlooked. :)

Best regards.
 
Last edited:

Byak@

Active Member
Licensed User
Thanks all. now i'm use MouseMove event and all right))
 
Top