whats new ¦  programming tips ¦  indy articles ¦  intraweb articles ¦  informations ¦  links ¦  interviews
 misc ¦  tutorials ¦  Add&Win Game

Tips (1541)

Database (90)
Files (137)
Forms (107)
Graphic (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Math (76)
Misc (126)
Multimedia (45)
Objects/
ActiveX (51)

OpenTools API (3)
Printing (35)
Strings (83)
System (266)
VCL (242)

Top15

Tips sort by
component


Search Tip

Add new Tip

Add&Win Game

Advertising

40 Visitors Online


 
...open url in new window with custom TWebBrowser?
Autor: Ermes Carrer
[ Print tip ]  

Tip Rating (12):  
     


{
  Normalerweise öffnet sich automatisch der Internet Explorer
  wenn im TWebBrowser eine URL in einem neuen Fenster geöffnet wird.
  Mit diesem Tip wird eine neue Instanz des eigenen Browsers
  erstellt und die URL dort geöffnet.
}

{
  Usually when you open a URL in new window in TWebBrowser it opens
  the Internet Explorer. This tip creates a new instance of your
  browser form and opens the new site in your browser.
}


procedure TForm1.WebBrowser1NewWindow2(Sender: TObject;
  var ppDisp: IDispatch; var Cancel: WordBool);
var
  
NewWindow: TForm1;
begin
  
// a new instance of the form will be created
  // Eine neue Instanz wird erstellt
  
NewWindow := TForm1.Create(self);

  NewWindow.Show;
  ppDisp := NewWindow.Webbrowser1.DefaultDispatch;
end;

 

Rate this tip:

poor
very good


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners