Link to home
Start Free TrialLog in
Avatar of ShelfieldCollege
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-
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nffvrxqgrcfqvvc
nffvrxqgrcfqvvc

oops.. Add the code above to notpad and save it as : resize.html

Then just to test it navigate to it:
WebBrowser1.Navigate2 "D:\resize.html"
Avatar of ShelfieldCollege

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-
The simplest way would be to set the size and position back in the
resize event of the control.