Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

Açık olan explorer sayfaları [adresler]

uses ddeman; function GetURL(Service: string): string; var ClDDE: TDDEClientConv; temp: PChar; begin Result := ''; //create a new DDE Client object ClDDE := TDDEClientConv.Create(nil); with ClDDE do begin SetLink(Service, 'WWW_GetWindowInfo'); temp := RequestData('0xFFFFFFFF'); Result := StrPas(temp); StrDispose(temp); CloseLink; end; ClDDE.Free; end; procedure TForm1.Button1Click(Sender: TObject); begin // the result should be something like: // "http://www.swissdelphicenter.ch","SwissDelphiCenter.ch" ShowMessage(GetURL('IExplore')); { ShowMessage(GetURL('Netscape')); } end; {**************************************} // To have the locationurls from all running instances of Internet Explorer - // including open folders and Windows Explorer - shown in a listbox. // by http://www.euromind.com/iedelphi/ uses shdocvw_tlb; procedure TForm1.Button2Click(Sender: TObject); var x: Integer; Sw: IShellWindows; begin sw := CoShellWindows.Create; for x := 0 to SW.Count - 1 do Listbox1.Items.Add((Sw.Item(x) as IWebbrowser2).LocationUrl); end;