Skip to Content

Get top and Left when click

Good morning everyone,

Is Does possible to get the position where the user make click?

I need to open a new form where the user make click in a cell of the matrix

Thanks in advance


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Apr 30, 2012 at 03:01 PM

    Thanks everyone for all answers.


    Dim x As Integer = Cursor.Position.X

    Dim y As Integer = Cursor.Position.Y

    If I get the top and the left of the matrix and using its columns width and row height, I can have a problem if the column is the last. It could happen that the sum of columns > screen resolution



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2012 at 10:21 AM

    Hi Carles,

    using the SAP Business One UI API you could know the item where che user make a click, like matrix, grid, button, etc..

    You can also know the Top and Left property of this item.

    But actually is not possible to know the absolute position of the mouse. The UI API does not expose this information.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.