Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Thu, 17 Apr 2008 01:19:01 -0700 (PDT),    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


How I can show the scrollbar as needed?   
Hi,

Sorry if I ask a duplicated question.

What I am looking for is: how to show the scrollbar when it is needed
(and hide it when it is not).

I read relevant threads in the forum, and already learned that I could
use DOCHOSTUIFLAG_SCROLL_NO flag to hide the scrollbar. But I still
don't know how to decide whether to show it or not.

Any suggestion would be deeply appreciated!
date: Thu, 17 Apr 2008 01:19:01 -0700 (PDT)   author:   yuzhu.shen

Re: How I can show the scrollbar as needed?   
A little clarification: what I mean by "needed" is that I want to show
the vertical / horizontal scrollbar if and only if the page is
higher / wider than the window of the WebBrowser control.
date: Thu, 17 Apr 2008 01:24:18 -0700 (PDT)   author:   yuzhu.shen

Re: How I can show the scrollbar as needed?   
"yuzhu.shen"  wrote in message
news:1726131b-3f00-4551-8343-3d4066bf0d0a@a1g2000hsb.googlegroups.com
> What I am looking for is: how to show the scrollbar when it is needed
> (and hide it when it is not).

document.body.scroll="auto";
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Thu, 17 Apr 2008 08:00:04 -0400   author:   Igor Tandetnik

Re: How I can show the scrollbar as needed?   
Hi, Igor. Thanks. :) Your advice are really helpful!

One (ok, actually two) more question:

1) In some cases, IE opens pop-up windows which are without address
bar and scrollbars. For example, running the following script will
generate one:

---------------------------------------------------------------------------------------------------------------------
window.open('dest.htm', '', 'height=300,width=400,left=500,top=200',
false);
---------------------------------------------------------------------------------------------------------------------

With the WebBrowser control in my application, I get an NewWindow3
notification when running the above script.

The dwFlags is 0x00040006, that is, NWMF_SUGGESTWINDOW | NWMF_FIRST |
NWMF_USERINITED.

I want to create an appropriate window (with or without address bar,
just like IE) in my application for this event. However, I think we
cannot judge from the flag that this new window is a pop-up window
without address & scrollbars, or it is a normal window.

Is there any other information that I can use to make this
judgment? :) What has IE done to make the decision?

2) (Still using the scenario above: run the window.open(...) script in
my WebBrowser control and get a NewWindow3 notification)
I notice that if I create a new WebBrowser control, and pass it back
in the NewWindow3's IDispatch** parameter, this WebBrowser will have
no scrollbars (even after I ask it to navigate to another location.)

How does this happen? Does the parent WebBrowser control implements
the IDocHostUIHandler::GetHostInfo() interface and set
DOCHOSTUIFLAG_SCROLL_NO?
How can I enable its scrollbars again?

Thanks very much!
date: Thu, 17 Apr 2008 09:25:28 -0700 (PDT)   author:   yuzhu.shen

Re: How I can show the scrollbar as needed?   
yuzhu.shen  wrote:
> I want to create an appropriate window (with or without address bar,
> just like IE) in my application for this event.

http://groups.google.com/group/microsoft.public.windows.inetexplorer.ie55.programming.webbrowser_ctl/browse_frm/thread/92cddbf7fdd58092

> 2) (Still using the scenario above: run the window.open(...) script in
> my WebBrowser control and get a NewWindow3 notification)
> I notice that if I create a new WebBrowser control, and pass it back
> in the NewWindow3's IDispatch** parameter, this WebBrowser will have
> no scrollbars (even after I ask it to navigate to another location.)

Yes, it honors parameters in window.open(), not necessarily those of the 
page it loads.

> How does this happen? Does the parent WebBrowser control implements
> the IDocHostUIHandler::GetHostInfo() interface and set
> DOCHOSTUIFLAG_SCROLL_NO?

Perhaps. I'm not sure how precisely this is implemented.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Thu, 17 Apr 2008 12:44:27 -0400   author:   Igor Tandetnik

Re: How I can show the scrollbar as needed?   
Thanks very much!! Igor. :)

On Apr 18, 12:44 am, "Igor Tandetnik"  wrote:
> yuzhu.shen  wrote:
> > I want to create an appropriate window (with or without address bar,
> > just like IE) in my application for this event.
>
> http://groups.google.com/group/microsoft.public.windows.inetexplorer....
>
> > 2) (Still using the scenario above: run the window.open(...) script in
> > my WebBrowser control and get a NewWindow3 notification)
> > I notice that if I create a new WebBrowser control, and pass it back
> > in the NewWindow3's IDispatch** parameter, this WebBrowser will have
> > no scrollbars (even after I ask it to navigate to another location.)
>
> Yes, it honors parameters in window.open(), not necessarily those of the
> page it loads.
>
> > How does this happen? Does the parent WebBrowser control implements
> > the IDocHostUIHandler::GetHostInfo() interface and set
> > DOCHOSTUIFLAG_SCROLL_NO?
>
> Perhaps. I'm not sure how precisely this is implemented.
> --
> With best wishes,
>     Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
date: Sun, 20 Apr 2008 00:03:33 -0700 (PDT)   author:   yuzhu.shen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us