Discussion Locked

Visual Foxpro _curobj equivalent

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am converting a legacy fp26 dos app to Vfp6. The dos app makes extensive use of _curobj to keep track of input fields on its screen. It returns a number corresponding to a particular 'get' box. I need this same functionality in visual, but can't find any help. I've tried putting 'wait window tran(_curobj,'9999')' in the activate, gotfocus &lostfocus methods of each of my comboboxes to see what is returned - always 0.

3 replies

by mark t.

The VFP equivalent to _curobj is the Focus property. The syntax is e.g., ThisForm.controlname.focus = .T.

by rouse01

Thanks Mark, I'm closing this. What I needed is the object number, not .t./.f. - so I just hardcoded a value into the valid method. This works for my purpose.

This discussion is closed to new replies.