难题《滚动截图》技术,寻求高手解答!谢谢!
比如:1)一个控件他的内容很多,那么会出现滚动条,
2)那么”滚动截图“就是说:
用程序控制滚动条自动从头滚动到尾,
把滚动过程看到的景物都截出来自动,连成一张图片 !!
3)天空网站的“SnagIt V7.02”做到了,谁有此技术资料?
http://www.skycn.com/soft/2290.html
天空网站的国产软件“超级屏捕“使用IE右键的COM技术来做
谁有此技术资料?
比如:1)一个控件他的内容很多,那么会出现滚动条,
2)那么”滚动截图“就是说:
用程序控制滚动条自动从头滚动到尾,
把滚动过程看到的景物都截出来自动,连成一张图片 !!
3)天空网站的“SnagIt V7.02”做到了,谁有此技术资料?
http://www.skycn.com/soft/2290.html
天空网站的国产软件“超级屏捕“使用IE右键的COM技术来做
谁有此技术资料?
[email protected]
再在这里帮你顶顶吧,不好意思啊,帮不了你
var
ViewObject: IViewObject;
sourceDrawRect: TRect;
begin
if EmbeddedWB1.Document <> nil then
try
EmbeddedWB1.Document.QueryInterface(IViewObject, ViewObject);
if ViewObject <> nil then
try
sourceDrawRect := Rect(0, 0, Image1.Width, Image1.Height);
ViewObject.Draw(DVASPECT_CONTENT, 1, nil, nil, Self.Handle,
image1.Canvas.Handle, @sourceDrawRect, nil, nil, 0);
finally
ViewObject._Release;
end;
except
end;
end;This tip provided by John
Q: How can I save a web page to a bitmap?A: Here's a code sample:procedure generateJPEGfromBrowser(browser: iWebBrowser2; jpegFQFilename: String;
srcHeight: Integer; srcWidth: Integer; tarHeight: Integer; tarWidth: Integer);
var
sourceDrawRect : TRect;
targetDrawRect: TRect;
sourceBitmap: TBitmap;
targetBitmap: TBitmap;
jpeg: TJPEGImage;
viewObject: IViewObject;
begin
sourceBitmap := TBitmap.Create ;
targetBitmap := TBitmap.Create ;
jpeg := TJPEGImage.Create ;
try
try
sourceDrawRect := Rect(0,0, srcWidth , srcHeight );
sourceBitmap.Width := srcWidth ;
sourceBitmap.Height := srcHeight ; viewObject := browser as IViewObject; if viewObject = nil then
Exit; OleCheck(viewObject.Draw(DVASPECT_CONTENT, 1, nil, nil, self.Handle,
sourceBitmap.Canvas.Handle, @sourceDrawRect, nil, nil, 0)); // Resize the src bitmap to the target bitmap
targetDrawRect := Rect(0,0, tarWidth, tarHeight);
targetBitmap.Height := tarHeight;
targetBitmap.Width := tarWidth;
targetBitmap.Canvas.StretchDraw(targetDrawRect, sourceBitmap); // Create a JPEG from the Bitmap and save it
jpeg.Assign(targetBitmap) ;
makeFileWriteable(jpegFQFilename);
jpeg.SaveToFile (jpegFQFilename);
finally
jpeg.free;
sourceBitmap.free ;
targetBitmap.free;
end;
except
// Error Code
end;
end;
是个什么东东 ,好象没声明啊
看晕了!
EmbeddedWB这里弄,不过你好像永不到,上边的代码是把ie里的网页存成图片的。