Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello,

In my application i have designed a Mdi Parent Form Which Include a MenuStrip, toolStrip and a Web Browser which have dock property set to 'FILL'

On menu click i am showing child forms,But as i have added a web browser on Mdi Parent Form.... the Child Forms are not displaying.I tried 'Send to Back' property of web browser but it not working.

I have to display a HTML page in my Mdi Parent Form(Main Menu Screen) and i have to display child forms on the top of the HTML page.

What to Do????
Please Help.....
Posted
Updated 3-Jun-16 10:04am
v2
Comments
johannesnestler 7-Apr-11 9:19am    
I think the problem is you cover your MdiClient (Control where the Mdi child forms are shown) with the WebBrowser, but I have no Idea how get the desired effect. You could call BringToFront on the MdiClient (you can obtain a reference by looping through the MdiParent's Controls collection) but you can not give the MdiClient a Transparent BackColor... hmmm...
Michel [mjbohn] 7-Apr-11 13:08pm    
Your Mdi childs got definitly covered by the browser control. Why do you need the browser? Maybe we can find a workaround.

What you may do is move the webbrowser to another form with dock to fill. Set that form's border style to none. Now at the mdi parent load event show this form resized to the client area of the parent form. Keep this forms object in a global variable as we may need this instance in the form resize event. At the height you may need to subtract the height of the toolbar and menu bar. The location would be 0,toolstrip bootom. Do the same at the form resize event as well. Set it to send to back always.

Hope this workaround helps.
 
Share this answer
 
You maybe to do call sendToBack method of webbrowser object when you call to the forms and when the forms being closed then call to form_closed event for get mdiparent property of the form, in fact, there can be call bringToFront method of webbrowser object.
 
Share this answer
 
Comments
Richard MacCutchan 4-Jun-16 5:06am    
Please do not post in old questions; this one was posted more than 5 years ago.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900