WebBrowser Control Page Sizing Events 
Author Message
 WebBrowser Control Page Sizing Events

I have a VB Form that contains a WebBrowser control.  I have written
code that handles the NewWindow2 Event, and I force the returned Object
to be another instance of my Form, which is registered as a browser.
All of this works fine in Windows NT and Windows 2000.

It works in Windows 98 too, but the height of the window is 0.  So all
I see when an HTML page has javascript that calls window.open(...), is
the title bar of the popup window.  The user can resize the window,
but this is not acceptable.

So I wrote more code to handle the WindowSet... events.  Again, it
works in NT and Windows 2000, and the windows open to the proper size.
But it doesn't work in 98.  I don't think I'm getting the
WindowSetHeight event, or if I am getting it, the value is 0.

I'm tempted to write logic that hardcodes the height to 300 pixels and
the width to 400 pixels if they are zero when the page resizes.  At
least this way, the user will see some of the body of the contents.

But I was hoping someone else has exerienced this problem and has a
solution.

Thanks.

Sent via Deja.com
http://www.*-*-*.com/



Thu, 24 Jul 2003 21:03:36 GMT  
 WebBrowser Control Page Sizing Events

Quote:

> I have a VB Form that contains a WebBrowser control.  I have written
> code that handles the NewWindow2 Event, and I force the returned
Object
> to be another instance of my Form, which is registered as a browser.
> All of this works fine in Windows NT and Windows 2000.

> It works in Windows 98 too, but the height of the window is 0.  So all
> I see when an HTML page has javascript that calls window.open(...), is
> the title bar of the popup window.  The user can resize the window,
> but this is not acceptable.

> So I wrote more code to handle the WindowSet... events.  Again, it
> works in NT and Windows 2000, and the windows open to the proper size.
> But it doesn't work in 98.  I don't think I'm getting the
> WindowSetHeight event, or if I am getting it, the value is 0.

> I'm tempted to write logic that hardcodes the height to 300 pixels and
> the width to 400 pixels if they are zero when the page resizes.  At
> least this way, the user will see some of the body of the contents.

> But I was hoping someone else has exerienced this problem and has a
> solution.

> Thanks.

> Sent via Deja.com
> http://www.deja.com/

It turns out that the client machine has to have Internet Explorer 5.5
in order for the Browser Control to handle Height, Width, and other
similar events correctly.

Sent via Deja.com
http://www.deja.com/



Fri, 01 Aug 2003 21:20:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. WebBrowser Control - Finding out page size

2. WebBrowser Control - Finding out page size

3. Page size for the background= Page size of the first page of the drawing

4. ExecWB and Zoom: Font Size in WebBrowser Control

5. To change the font size of the text displayed in a WebBrowser control

6. change font size in webbrowser control

7. Setting Scrollbar size in WebBrowser control.

8. Text size in webbrowser control

9. Webbrowser control text size

10. webbrowser control size not flexible

11. Download size and WebBrowser control

12. Change text size in WebBrowser control?

 

 
Powered by phpBB® Forum Software