I want to open url in already existing, active opera/IE/FF tab using delphi.
I tried:
ShellExecute(hw,'open',pchar(url),nil,nil,SW_SHOWNORMAL);
where hw is handle of web browser and url is string variable with url I want to open, but it opens new tab instead of using active tab.
I also tried:
procedure SetURL(Browser, URL: String);
var
Client_DDE: TDDEClientConv;
begin
Client_DDE := TDdeClientConv.Create(nil);
with Client_DDE do
begin
SetLink( Browser, 'WWW_Activate' );
RequestData('0xFFFFFFFF');
SetLink( Browser, 'WWW_OpenURL' );
RequestData(URL);
CloseLink;
end;
Client_DDE.Free;
end;
And SetURL('Opera', url);
in buttonclick procedure, but it also opens url in new tab. When I use RequestData(URL + ',-1');
in SetURL procedure then it opens url in new window. Any ideas how to open url in already existing browser tab?
I have Delphi 7.