Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wait window Position Query
Message
From
13/02/2013 12:21:30
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01565854
Message ID:
01565913
Views:
45
>I have a grid where data is entered into. If the user enters invalid data I want
> to place a wait window near the row and column where the incorrected data
> is entered with a message. Is there a way I can determine the X and Y
> co-ordinates of where the cursor is and display the wait window command?

If you have the object where the input occurred, you can use OBJTOCLIENT(o,N) to obtain the coordinates (left, top, width and height) of the location where the input was errant. Then, converting those pixel values to foxels, you can determine where to position the wait window.

I think the wait window popup near the location is a great idea.

Another one to consider is create a custom class that you can instantiate where you would do the wait window. That class would have a timer and after so many seconds, automatically close unless the user was hovering over it, for example. That way you can decorate it with any colors you like, particular messages, and if you later add extensible features to it you can log the events, send them to a queue which can be examined by the user after the fact, or whatever.

>Is there perhaps a better way of doing this?
>Thanks in advance

I think the MessageBox() suggestion is a bad idea because it steals focus away and disrupts trains of thought. The user is focused on the grid, and like you suggest, that's where their focus should remain. Proximity popups which persist for a time, then go away silently, are a great idea.

BTW, your country's flag image is beautiful. :-)
Previous
Reply
Map
View

Click here to load this message in the networking platform