Hi Koen,
I see that LostFocust() doesn't fire in this case. It's definitely a bug. The GotFocus() seems to be working fine.
Try following workaround. Add a property to a form, say
lWcHasFocus
Thisform.lWcHasFocus = .T.
Thisform.lWcHasFocus = .F.
..
IF Thisform.lWcHasFocus
...
ENDIF
>
>I have a myContainer containing an IE object and a couple of buttons to facilitate the editing of IE.Document. I would like to have a "are you sure to leave form without saving changes" message box when user clicks the form QueryUnload X box.
>The myContainer.LostFocus does not get fired when applying the QU-Box.
>Noticed in the coverage profiler that last methods which are activated: myForm.QueryUnload - myForm.Destroy - myContainerDestroy.
>and no LostFocus
>
>Regards,
>
>
--sb--