ShelfieldCollege
asked on
Strange Problem, any ideas how this happened?
Hi there, I have an application which basically loops through a large number of URLs and records whether they could be opened or not.
The problem which has occured is that there are a number of controls and frames on the form and to the right of these is a web browser control which is used to open the URLs and so on. For some reason, during the process of checking a number of URLs the web browser has resized itself to cover the entire form yet remains behind the other controls. ALthough this isn't what I want to happen in this application, I would like to know how it occured so that I can recreate in aplications where it might be a nice feature.
This screenshot shows what I mean, the white background and web page which is covering the background of the form was originally placed where the red square is. I have no code which actively resizes the browser control, so presumably some javascript on one of the webpages which was opened has caused this rather strange effect.
Any ideas on how this happened and a) how I could recreate it and b) how I could prevent it happening in this appliction would be great thanks,
Link to screenshot: http://area51.jello.me.uk/HowTheHell.bmp
Cheers
-Matt-
The problem which has occured is that there are a number of controls and frames on the form and to the right of these is a web browser control which is used to open the URLs and so on. For some reason, during the process of checking a number of URLs the web browser has resized itself to cover the entire form yet remains behind the other controls. ALthough this isn't what I want to happen in this application, I would like to know how it occured so that I can recreate in aplications where it might be a nice feature.
This screenshot shows what I mean, the white background and web page which is covering the background of the form was originally placed where the red square is. I have no code which actively resizes the browser control, so presumably some javascript on one of the webpages which was opened has caused this rather strange effect.
Any ideas on how this happened and a) how I could recreate it and b) how I could prevent it happening in this appliction would be great thanks,
Link to screenshot: http://area51.jello.me.uk/HowTheHell.bmp
Cheers
-Matt-
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers thanks, that explains how it's happened, how about a way of preventing it happening with using a simple webbrowser control, as opposed to retrieving the HTML first then removing that code manually before desplaying it?
it's actually quite a nice little effect in an application, especially if I could get the form controls to have a transparent background.
Anyways, if anyone knows how to prevent it happening I'd greatly appreciate it.
Thanks
-Matt-
it's actually quite a nice little effect in an application, especially if I could get the form controls to have a transparent background.
Anyways, if anyone knows how to prevent it happening I'd greatly appreciate it.
Thanks
-Matt-
The simplest way would be to set the size and position back in the
resize event of the control.
resize event of the control.
Then just to test it navigate to it:
WebBrowser1.Navigate2 "D:\resize.html"