|
-
Oct 27th, 2001, 08:53 AM
#1
Thread Starter
New Member
Please help me..
I need to know how i can get the coordinates of all (several) "active fields", such as buttons, links and windows.
What im trying to do is to form a "gravitational"-field around everyting worth clicking on so that the mouse pointer allways will be moving towads center of the closest "active field" relative to the tru pointer possition.
you with me?
-
Oct 27th, 2001, 11:26 AM
#2
Lively Member
Cool idea, im not totally sure what you mean but..
Can you not just get the position of the components on the form like:
CenterX = (command1.left + command1.width)/2
CenterY = (command1.top + command1.height)/2
Then to work out which component is closest find the difference in X and Y from the component to the mouse pointer, use pythagoras to find the distance then compare.
Or maybe you'd want to multiple the distance by the area of the component using a similar thing to above, to implement more sense of gravity so the larger/heavier components have a stronger field.
Darren.
-
Oct 27th, 2001, 11:56 AM
#3
Thread Starter
New Member
wise!
That is a good way for the calculus..
but the tru problem lies in finding the objects. There is quite a few different places to click when navigating in windows. And i dont know the funktions that can find them and ther coordinates.
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
|