Activate Event Does Not Fire in MDI Child

  • Thread starter Thread starter afrinspray
  • Start date Start date
A

afrinspray

Guest
Hello,
I'm having a few problems converting a visual basic 6 program to visual basic .net. In my old program, I used the activate events of mdi children frequently. While converting to .net, I've run into problems because the Activate event isn't being triggered in the child forms.

Why does the activate event not fire in an MDI child form? Did Microsoft replace that event with MdiChildActivate? I would prefer not to use the MdiChildActivate event if possible...
Any response would be greatly appreciated.

Thanks,
Mike :D

PS - Some other people were having the same problem
http://discuss.develop.com/archives...m+bug+mdi+child+forms+activate+event&f=&a=&b=
 
Yes, that behaviour has changed. The MdiChildActivate event of the parent form will fire when the user switches between MDI children, and when the last one is closed.
 
Why would they do that? Activate isn't necessary, but it sure was convenient.

Also, for anyone having problems using the MdiChildActivate event:
I just call functions from inside the MdiChildActivate event, to simulate the old Activate function of Mdi Children.
For anyone who has trouble using that event, the solution to your problem might be to use the addhandler/ removehandler functions inside the MdiChildActivate event. That way you can manually activate individual forms to your desires, without the event being fired twice.

Thanks,
Mike
 
Back
Top