Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(1270) returns screen object?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00339660
Message ID:
00339745
Views:
19
>>>
>>Hi Marcia & Nigel,
>>
>>I don't think that this is goofy at all. If the mouse pointer is within the VFP main window, and no form is present it returns a reference to the _SCREEN object. If it's over the command window or an edit window or outside the main VFP screen it returns .F. This is consistent because the screen is an object and these other items aren't.
>
>The problem is: position a form at say 5,100 and try SYS(1270, 6, 101) - this is returning the _Screen, not the form object. In my case, the form is positioned at (_Screen.Width-160, 1) I check SYS(1270, _Screen.Width-160, 5) and it doesn't return the form object. It should!

Nigel,

I think that the problem is that you're assuming that the top and left coordinates are absolute. They're not, they're relative to the VFP desktop and as such don't take into consideration the VFP title bar, menu bar and any existing tool bars. From what I can gather, SYS(1270) relies on the absolute coordinates, not relative. If, for example, I position the mouse over any part of the form and use MROW() and MCOL() to get the position of the mouse to use with SYS(1270), I get back a reference to the the form. If the form's top and left co-ordinates are at 0, 0, and I use 1, 1 I get a reference to the _SCREEN, since 1, 1 is the top upper left hand corner of the VFP main window.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform