Thanks
Cal
"José Manuel Agüero" <jmaguero_vodafone.es> wrote in message
news:e0**************@TK2MSFTNGP12.phx.gbl...
Hello, active:
The Activate event occurs before the former object has lost the focus.
You can understand how and when a control gets and losts the focus in the
Enter event topic:
http://msdn.microsoft.com/library/de...entertopic.asp.
Although its not perfectly explained, I think. I understand it means:
(NewControl is the control that receives the focus, OldControl is the one
that looses it)
<PASTE>
When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on),
by calling the Select or SelectNextControl methods, or by setting the
ContainerControl.ActiveControl property to the current form, focus events
occur in the following order:
1.. NewControl.Enter or Activated
2.. NewControl.GotFocus
3.. OldControl.Leave or Deactivate
4.. OldControl.Validating
5.. OldControl.Validated
6.. OldControl.LostFocus
When you change the focus by using the mouse or by calling the Focus method,
focus events occur in the following order:
1.. NewControl.Enter or Activated
2.. NewControl.GotFocus
3.. OldControl.LostFocus
4.. OldControl.Leave or Deactivate
5.. OldControl.Validating
6.. OldControl.Validated
If the CausesValidation property is set to false for OldControl, the
Validating and Validated events are suppressed.
</PASTE>
Regards.
" active" <ac****@REMOVEa-znet.com> escribió en el mensaje
news:%2****************@tk2msftngp13.phx.gbl...
| I remember when I checked NewGroups for comments about the VB6 Activate
| event and found that many thought it was not a reliable way to keep track
of
| which form has focus. There was enough bad press that I avoided it.
|
| I now have a project with MDI child forms and non-MDI child forms coming
and
| going as the user selects different options. I need to know which form is
| the active one and thought that I could use the Activate and Deactivate
| events to maintain a global variable that could be checked as needed.
|
| Before I put forth the effort I thought I'd check to see if anyone had
| experience using those events and/or had any helpful suggestions.
|
|
| Cal
|
|