1.C# webbrowser ä¿åhtmlåå¾ç
C# webbrowser ä¿åhtmlåå¾ç
æ¯è¦è·å带å¾ççè±æºHTMLæ件å§ï¼å¦ææ¯çè¯å¯ä»¥ç¨ä¸é¢çæ¹æ³
//urlæ¯è¦ä¿åçç½é¡µå°å
//filePathæ¯ä¿åå°çæ件路å¾
public static bool SaveWebPageToMHTFile(string url,autojs论坛源码 string filePath)
{
bool result = false;
CDO.Message msg = new CDO.MessageClass();
ADODB.Stream stm = null;
try
{
msg.MimeFormatted = true;
msg.CreateMHTMLBody(url, CDO.CdoMHTMLFlags.cdoSuppressNone, "", ""); stm = msg.GetStream();
stm.SaveToFile(filePath, ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
msg = null;
stm.Close();
result = true;
}
catch
{ throw; }
finally
{
//cleanup here
}
return result;
}
2024-11-15 06:29
2024-11-15 06:11
2024-11-15 06:07
2024-11-15 05:16
2024-11-15 04:42
2024-11-15 04:27
2024-11-15 04:27
2024-11-15 04:03