Get the current URL from the current browser

zhaozj2021-02-08  220

Determine DDEMAN in the USES clause. Uses Windows, DDeman, ... function get_url: string; var cliente_dde: tddeclientconv; Temp: pchar; file: // << -------------- - this is the new begin Result: = ''; Cliente_DDE: = TDDEClientConv.Create (nil); with Cliente_DDE do begin SetLink (Servicio, 'WWW_GetWindowInfo'); temp: = RequestData ( '0xFFFFFFFF'); Result: = StrPas (temp); StrDispose (temp); file: // avoid memory leaks CloseLink; end; Cliente_DDE.Free; end; procedure TForm1.Button1Click (Sender); begin showmessage (Get_URL ( 'Netscape')); or showmessage (Get_URL ( 'IExplore'); END;

转载请注明原文地址:https://www.9cbs.com/read-2692.html

New Post(0)