List Info

Thread: NewWindow Weirdness




NewWindow Weirdness
user name
2006-05-02 13:30:58
Please try...

begin
  with TChildForm.Create(Self) do
  begin
    Browser.go('about:blank');
    ppDisp := Browser.Application;
    Show;
  end;
end;


--- In delphi-webbrowser@yahoogroups.com,
"copper_france" 
<copper_france...> wrote:
>
> --- In delphi-webbrowser@yahoogroups.com, tesche wrote:
> >
> > --- In delphi-webbrowsery..., "Adam
Stiles" <adamn...> wrote:
> > > Hi,
> > > 
> > > Strange bug here... seems to affect
TWebBrowser, TEmbeddedWB 
etc.
> > > 
> > > Some browsers opened via NewWindow2 will
"disappear". For 
> example, 
> > new
> > > windows opened from "http://www.netcenter.com
" will disappear, 
> > while those
> > > opened at Tripod, (http://duhg.tripod.com/)
will not.
> > > 
> > > To demonstrate, create a main form with a
browser on it. Create 
a 
> > child form
> > > with another browser on it.
> > > 
> > > In create for the main form, navigate to the
netcenter address. 
In
> > > OnNewWindow2 of the main window browser, do
this:
> > > 
> > > procedure TForm1.BrowserNewWindow2(Sender:
TObject; var ppDisp: 
> > IDispatch;
> > >   var Cancel: WordBool);
> > > begin
> > >   with TChildForm.Create(Self) do
> > >   begin
> > >     ppDisp := Browser.Application;
> > >     Show;
> > >   end;
> > > end;
> > > 
> > > NetCenter should open a new browser window on
our new form, but 
> the 
> > problem
> > > is that its not visible... Most other popups
work fine, like 
the 
> > Tripod
> > > popups.
> > > 
> > > Its seems that its the windows which open via
with top and left 
> > parameters
> > > that have a problem... but how to fix? Any
ideas?
> > > 
> > > I've got a simple sample if you want it.
> > > 
> > > Adam
> > 
> > Hi,
> > 
> > I found the following if opening with the script
"window.open
> > ('...','...',top=tt, left=ll, width=ww,
height=hh').
> > I watched this in OnNavigateBefore2 in the new
browser.
> > 
> > 1. If left=0 and top=0, than all works fine.
> > 2. If left <= width, than width results in the
differenz "width-
> left".
> > 3. If left > width, than width stays as in
"window.open" but the 
> > browser is not visible.
> > The same results for top and height.
> > 
> > I'm searching for a solution. Have anyone found
it?
> > 
> > Benno
> >
> 
> Hi,
> 
> I've got the same problem... I've removed my Show for
the popup in 
> onnewwindow2 and added :
> 
> void __fastcall TFPopup::BrowserVisible(TObject
*Sender, WordBool 
> Visible)
> {
>     this->Visible=Visible;
> }
> 
> It's seems to work..
> Hope it will help!
>








Subscribe:   delphi-webbrowser-subscribe@yahoogroups.com 
Unsubscribe: delphi-webbrowser-unsubscribe@yahoogroups.com 
List owner:  delphi-webbrowser-owner@yahoogroups.com 
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http
://groups.yahoo.com/group/delphi-webbrowser/

<*> To unsubscribe from this group, send an email to:
    delphi-webbrowser-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )