Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ActiveContol Not An Object
Message
From
06/09/2007 19:56:23
 
 
To
06/09/2007 03:54:38
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01252661
Message ID:
01252904
Views:
16
Hi Jon.

ActiveControl returns a reference to the currently active control if there is one, but that is not quite the same as the one that has focus, since it may have the focus but not be considered active by FoxPro. Where are you trying to use it?

As for skipping controls, there easiest way if to use the When event. If you return .F. in that the control will not receive focus and instead focus will move on to the next control in the sequence.

Ian Simcock.



>Hi All,
>
>Two questions in one here I'm affraid!!
>
>Firstly, I'm having a problem with using the activecontrol property. Basically I have a form which has a panel control on it and then all the actual text boxes sit on the panel control. If I call _screen.activeform it gives me all the correct info about my form. However, what I really want to do is be able to find out which control has focus.
>
>I have tried _screen.activeform.activecontrol and also _screen.activeform.cntpanel.activecontrol to account for the panel I have added but for some reason it always returns 'expression cannot be evaluated'.
>
>What am I doing wrong here?
>
>Secondly, on the form I wish to be able to skip over certain controls if some specific condition is met and move on to the next control. So for example 3 textboxes and if you enter 'a' in the first one you cannot get into textbox2 but go directly to textbox3. I have looked at the tabstop but that doesnt stop you clicking into the control. Any ideas?
>
>It's been a long time since I developed in VFP and I think its showing!!!!
>
>Thanks
>
>Jon
Previous
Reply
Map
View

Click here to load this message in the networking platform