Delphi TWebBrowser[7] 鑾峰彇缃戦〉鍥剧墖锛堥潤鎬佸拰鍔ㄦ€侊級

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Delphi TWebBrowser[7] 鑾峰彇缃戦〉鍥剧墖锛堥潤鎬佸拰鍔ㄦ€侊級相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/ring' title='ring'>ring   begin   ram   ini   鍒涘缓鏃堕棿   ima   copy   int   create   

Delphi TWebBrowser[7] 鑾峰彇缃戦〉鍥剧墖锛堥潤鎬佸拰鍔ㄦ€侊級

1銆侀潤鎬佸浘甯哥敤鏂规硶锛?/strong>

uses WinInet

function GetLocalFileNameFromIECache(url:string; var LocalFileName:string):DWORD;
var
  D: Cardinal;
  T: PInternetCacheEntryInfo;
begin
  result := S_OK;
  D := 0;
  T:=nil;
  GetUrlCacheEntryInfo(PChar(Url), T^, D);
  Getmem(T, D);
  try
    if (GetUrlCacheEntryInfo(PChar(Url), T^, D)) then
      LocalFileName:=T^.lpszLocalFileName
    else
      Result := GetLastError;
  finally
    Freemem(T, D);
  end;
end;

2銆佸姩鎬佸浘

uses Mshtml, ActiveX, ClipBrd

var
  iIndex: Integer;
  Rang:IHTMLControlRange;
  ImgSel: IHTMLControlElement;
begin
  iIndex := 0; //鎵€闇€鐨勫浘鐗囧湪缃戦〉涓嚭鐜扮殑椤哄簭
  Rang := ((IHTMLDocument2(WebBrowser1.Document).body as HTMLBody).createControlRange) as IHTMLControlRange;
  ImgSel := IHTMLDocument2(WebBrowser1.Document).images.item(iIndex,EmptyParam)as IHTMLControlElement;
  Rang.add(ImgSel);
  Rang.execCommand(鈥楥opy鈥? False, 0);
  Image1.Picture.Assign(ClipBoard);
end;

銆€銆€

 

 

 

鍒涘缓鏃堕棿锛?020.11.23銆€銆€鏇存柊鏃堕棿锛?/span>

 

以上是关于Delphi TWebBrowser[7] 鑾峰彇缃戦〉鍥剧墖锛堥潤鎬佸拰鍔ㄦ€侊級的主要内容,如果未能解决你的问题,请参考以下文章

jQuery.鑾峰彇淇敼value

PostgreSQL 鑾峰彇 SEQUENCE 鍒楄〃

鑾峰彇鍏冪礌鍐呭

19_鑾峰彇鍛戒护鍙傛暟

鑾峰彇json涓殑灞炴€у€硷紝鐢熸垚鏂癹son

shell 鑾峰彇瀛楃涓茬殑闀垮害