|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MDI Child Windows Overlapped by control on ParentHello everyone.
I have an MDI form (parent) that has a number of controls on it. When I display MDI child windows, the child windows appear behind the controls that are on the parent window. How can make it so that the child window are on top of the controls on the parent window. Thanks in advance. Diego Hello, Diego,
I think that it is a bit unusual to put controls directly on the MDI form. If you do they will always be on top, as you've noticed. Is there some reason that you can't put your controls on a toolbar? If you really must do something like this, the only possibility that I can think of is to draw fake images of your controls on the MDIClient and do all of your own processing of mouse and keyboard events to simulate the behaviour of real controls. To me, this sounds like far too much trouble, and it has the associated risk that goes with the caveat in the documentation for the MDIClient that says: "The MdiClient type supports the .NET Framework infrastructure and is not intended to be used directly from your code." Cheers, Randy diego wrote: Show quoteHide quote > Hello everyone. > > I have an MDI form (parent) that has a number of controls on it. When I > display MDI child windows, the child windows appear behind the controls > that are on the parent window. How can make it so that the child window > are on top of the controls on the parent window. > > Thanks in advance. > > Diego > Hi Randy,
Thanks for your reply. What I want to place on the MDI form is a Web browser control to display a page from a pre-determined site. This page may contain announcements, warnings, etc. for the users. Is this possible? Thanks in advance. Deigo Hello, Diego,
I don't think it is possible to do this directly. It would be easy to put it onto some sort of a docked container control, but I guess this is not what you want. If the contents are for "display-only", and you do not need any active controls on the MDI background you might be able to find a way to copy the image of the Web page to the MDIClient. I don't know offhand how you would get the image from the web page, but if you can then you could do something like this: Private WithEvents mFrame As MdiClient ' MDI Client window frame. You will need to "find" the MDIClient. Maybe there are better ways, but this has worked for me: For Each ctlCurrent As Control In Me.Controls If (TypeOf ctlCurrent Is MdiClient) Then mFrame = DirectCast(ctlCurrent, MdiClient) Exit For End If Next ctlCurrent I have used this in the first pass of the MDI Form's Activate event, but have recently learned that .Net 2005 provides a "Shown" event that may be better for this. Then, use the Paint event of the MDIClient to display the image of your web page. Private Sub MDIControl_Paint(ByVal sender As Object, _ ByVal e As PaintEventArgs) _ Handles mFrame.Paint ' Copy the image here using e.Graphics . . . End Sub But again, don't forget the caveat that "The MdiClient ... is not intended to be used directly from your code." And if you want to simulate active controls on the MDI background, this will become much more difficult. There might be better/easier ways to accomplish the functionality that you want. Good luck, Randy diego wrote: Show quoteHide quote > Hi Randy, > > Thanks for your reply. > > What I want to place on the MDI form is a Web browser control to > display a page from a pre-determined site. This page may contain > announcements, warnings, etc. for the users. > > Is this possible? > > Thanks in advance. > > Deigo > I've put many controls on a MDI parent, not unusual at all. However you
should put them on a container which you dock. Then you should have no problems whatsoever. Example: http://www.espital.net/studyui.htm Show quoteHide quote "diego" <diego***@yahoo.com> wrote in message news:1144039947.747020.11760@g10g2000cwb.googlegroups.com... > Hello everyone. > > I have an MDI form (parent) that has a number of controls on it. When I > display MDI child windows, the child windows appear behind the controls > that are on the parent window. How can make it so that the child window > are on top of the controls on the parent window. > > Thanks in advance. > > Diego >
Web browser control in VB 2003
Formula in a text box Structure vs Class Objects keep program running Q: DataGrid Sort how can I exit from a recursive subroutine? How do I fix this code?? any ideas? Runas stored procedure in VB binding source? VS.NET Public Namespaces, classes, Function - Conceptual misunderstanding. |
|||||||||||||||||||||||