rbulph Posted March 13, 2006 Posted March 13, 2006 I'm surprised that, at runtime, if you click on an MDI child form or select one of its controls, it doesn't get activated, i.e. its caption bar remains the same colour and the MDI's caption doesn't get changed. I thought activation of a form in this manner was standard behaviour - if you look at Word for instance you will see that the form does get activated. So is there a very simple way to achieve this effect? I can use the form's Enter event, but that won't trigger if the user clicks on the form, only on a control that is capable of being entered. So any thoughts? Quote
*Experts* Nerseus Posted March 13, 2006 *Experts* Posted March 13, 2006 The behavior I see is that each child window does get colored in the "Active Window" titlebar color while the other child windows remain in the "Inactive Window" titlebar color. The MDIParent window itself always shows up as the "Active Window" for the titlebar color. If you maximize a child window, it's caption (Titlebar's Text) is incorporated into the MDIParent window's title. The text changes from: Form1 to Form1 - [Child1] I can post a test project if you'd like. Or maybe you could post yours? -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
rbulph Posted March 13, 2006 Author Posted March 13, 2006 Yes, you're right, usually this works OK. So after a bit of playing around I figured out what is causing it for me - it's my use of the SetScrollInfo API. If I take that out I don't have the problem. Why this should have the described effect I've no idea, but I think I can work around it by activating the form on its MouseDown event etc. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.