Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

does function exist? function that returns obj.ref based upon x,y coordinates on a form

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!

I can drag controls along my form.
Now I like to know what controls is on a certain x,y position.
Is there a function which retrieves object-reference based opun x,y value?
Looking for such in help-file is hard!

-Bart
 
Sys(1270) does that, but you can't pass in coordinates, it's always the object under the mouse cursor.

You don't need that, though, drag and drop causes drag and drop events of the drop target object.

In regard of drag&drop of form objcts, see sample code in slutions.app, it's already programmed fully functional. You're reinventing a wheel.

Bye, Olaf.

 
Hi Olaf!
Not reinventing the wheel but trying to find my way.
-Bart
 
Sys(1270) does that, but you can't pass in coordinates, it's always the object under the mouse cursor.

Actually, SYS(1270) has optional x and y parameters, so you can pass a point and find out what's there. However, be aware that the point is measured from the upper left corner of the screen, not the app or the form.

Tamar
 
Tamar,
I tried but I got as reference just the form returned.
-Bart
 
Tamar,

Sorry, misread your reply. This works indeed.

Thanks,
-Bart
 
Ah, thanks Tamar. I see I had this overlooked. I am too used to using this while debugging, creating object references to things I point to and for nothing else.

Anyway, Bart, it's ok, if you're happy with it.
Also take a look at what Teknosoft already has done and offers here: thread184-1681618

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top