Como abrir link em uma nova janela do Internet Explorer

Delphi

02/10/2003

Galera,

Como q eu faço para abrir um link da web numa nova janela, pois da maneira que estou fazendo abre numa janela q já está aberta.

ShellExecute(self.WindowHandle,´open´,PChar(url),nil,nil, SW_SHOWNORMAL);

Obrigado...


Hell_gentleman

Hell_gentleman

Curtidas 0

Respostas

Luizfernando777

Luizfernando777

02/10/2003

na Uses do aplicativo
colocar ComObj
declarar uma variavel
IEApp: Variant;

Button1.OnClick
begin
IEApp := CreateOLEObject(´InternetExplorer.Application´);
IEApp.visible := true;
IEApp.Top := 0;
IEApp.Left := 0;
IEApp.width := screen.width;
IEApp.height := screen.height;
IEApp.Navigate(´http://www.ClubeDelphi.com.br´);
end;


GOSTEI 0
Hell_gentleman

Hell_gentleman

02/10/2003

Como faço para poder resolver este erro?


GOSTEI 0
Luizfernando777

Luizfernando777

02/10/2003

tenta assim:
button1.click
var
buffer: String;
begin
buffer := ´http://www.clubedelphi.com.br´;
ShellExecute(Application.Handle, nil, PChar(buffer), nil, nil, SW_SHOWNORMAL);
end;
eu uso o Delphi 6 SP2


GOSTEI 0
Hell_gentleman

Hell_gentleman

02/10/2003

O problema é q dessa forma se tiver uma janela do Internet explorer já aberta o link abrirá nesta. E é isso e q eu estou tentando impedir.


GOSTEI 0
Paty

Paty

02/10/2003

Estou tendo o mesmo problema.

Estou utilizado :
ShellExecute(Application.Handle, nil, PChar(buffer), nil, nil, SW_SHOWNORMAL);

pois, irá abir a URL com o browser padrao.

A opcao com CreateOLEObject(´InternetExplorer.Application´); so vai funcionar para o internet explorer.

Como voce consegui resolver o problema?


GOSTEI 0
POSTAR