>CHEAP TRICK 33
>public ThisControlHasFocus
>
>in the controls Gotfocus:
>ThisControlHasFocus=this.name
>
>in the control's Lostfocus:
>ThisControlHasFocus=[None]
Using public variables in forms is generally a Bad Thing. What if you run this form twice?
If you have to use this technique, instead of ThisForm.ActiveControl, it's much better to create a custom form property (Form menu: New Property). That way, it's scoped to the form. Mike Helland explains above what else is wrong with this technique...