有谁知道怎么用C#把任何一个网站用图片的形式保存下来,一个页面的所有内容,包括滚动条的??急求~~谢谢!!知道的给说下。

解决方案 »

  1.   

    晕死.楼主的意思是就跟在键盘上按下Pringt screen
    一样
      

  2.   

    我的意思是用C#代码实现,不需要键盘控制,就是输入一个网站,把这个网站的所有内容都以图片的形式保存下来,也就是抓图吧,如:
     //wbContent.Navigate(txtURL.Text.ToString().Trim());
                //while (wbContent.ReadyState != WebBrowserReadyState.Complete)
                //{
                //    System.Windows.Forms.Application.DoEvents();
                //}
                //HtmlDocument hd = wbContent.Document;
                //int height = Convert.ToInt32(hd.Body.GetAttribute("scrollHeight")) + 10;
                //int width = Convert.ToInt32(hd.Body.GetAttribute("scrollWidth")) + 10;
                //wbContent.Height = height;
                //wbContent.Width = width;
                //Bitmap bmp = new Bitmap(width, height);
                //Rectangle rec = new Rectangle();
                //rec.Width = width;
                //rec.Height = height;
                //wbContent.DrawToBitmap(bmp, rec);
                //bmp.Save("c:\\t.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
    但是这个不能抓像www.163.com这种的,URL后面带参数的就可以抓,不知道为什么~~~