Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MDI Children don't get Focus

36 views
Skip to first unread message

Maqsood Ahmed

unread,
Jul 29, 2004, 2:22:43 AM7/29/04
to
Hello,
We are converting our product from Dot net Framework v1.0 to Dot net
Framework v1.1 and experiencing some problems regarding it. In our MDI
Application, any Child window doesn't activate on mouse click in Client
Area, whenever we open/close any Child form that hosts ActiveX control (such
as Acrobat Reader or MS Web Browser). It activates only when one click at
Form Title. One can perform all functions on the particular form, but it
doesn't get fully visible (active) unless its title is clicked. One more
thing, when I close
all open MDI children, and reopen them, application starts to work fine. Has
anybody experienced such problem? Any suggestions?
Bye.


JohnLiu

unread,
Aug 2, 2004, 10:27:51 PM8/2/04
to
"Maqsood Ahmed" <maqsoo...@kolachi.net> wrote in message news:<#duFoRTd...@TK2MSFTNGP09.phx.gbl>...

Yes.
Trick is to hijack the MOUSEACTIVATE event and call Activate on the
form.
If you are going to use this on multiple forms, it may be easier to
put this in a baseform and then inherit from this.

(Our particular project was VB.NET)

Protected Overrides Sub WndProc(ByRef m As Message)
Select Case m.Msg
Case &H21 ' WM_MOUSEACTIVATE
Me.Activate()
End Select
MyBase.WndProc(m)
End Sub

jliu - www.ssw.com.au

0 new messages