Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Browser Control won't size

Status
Not open for further replies.

vbajock

Programmer
Jun 8, 2001
1,921
US
Microsoft web browser control, Active X object embedded on form. Pretty simple code:

Private Sub Form_Load()
WebBrowser0.Width = 6000 'in twips 1 in=1440 twips
WebBrowser0.Height = 5760
End Sub

Problem: Height works fine, won't recognize any width setting. Anyone had any experience with this problem?

 
vbajock,
There was a problem with some older WebBrowser controls, that the width couldn't be adjusted, and we used to put them on the form and size them in design view, then cut them to the clipboard, then paste them back to the form and they worked ok then. I know, it sounds kind of like rolling down all of the windows and running around the car clockwise twice.....but it worked.

I think that might have been back in the IE 5.0 or so days.

Tranman
 
The file date was pretty recent, so I ended up hacking away at for a while. The fix turned out to be pretty simple. If you move the code from the LOAD event to the OPEN event of the form it works perfect. Must be some type of timing issue involved when it loads the Web page into the control at the same time the form is loading up. Thanks for your help, in any case.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top