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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form just "sitting there" problem..

Status
Not open for further replies.

mpgalvin

Programmer
Feb 5, 2001
119
IE
I have a form which is quite complicated, lots of controls and lots of containers. When I run it, the first thing seen is a grid. I'm setting focus to this grid in the form_init event, and even though it does get focus, it almost immediately, control seems to "go" somewhere else. The grid looks like it still has focus, but I have to press 'escape' once before I can start using the form. (all buttons, text boxes elsewhere on the form are equally unavailable - not disabled, just not clickable).

Is there anyway of finding of which control is getting focus - why would escape solve my problem? I tried stepping, but it did no good.
 
You might try turning event tracking to see what events are
occuring in debugging, have used this to track down some really quirky items
 
Hello.

Do you use menus in your app? If this is the case, are you activating them programatically?

Grigore Dolghin
Class Software
Bucharest, Romania
 
I've solved this problem - I was binding a control to a field that didn't exist. The error message was stopping control from passing to the grid, but it didn't show on screen. Pressing <ESC> removed the message box, and away I went.

Meanwhile, Pollock, I think I need to learn how to event track for future reference. Is there anywhere on the web that would (or can you) teach me the basics?
 
In foxpro debugger, under tools, there is event tracking option, turning it on allows you track all events, you can selectively remove events like mouse moves from the list of events to track. Also you can output it to a file as well as screen. When i have a unknown problem, like yours, i turn tracking on and usually put it to file, i then analyze the file look at what is occuring.
 
Ah, I see. But presumably this only tracks in which order an event occurs, right? It doesn't report errors or anything? In effect, it probably won't have helped my problem but it's good for future reference.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top