如何在C#中使用SHDocvw通过用户交互进行剪切 [英] How can I use SHDocvw in C# for clipping through user interaction

查看:277
本文介绍了如何在C#中使用SHDocvw通过用户交互进行剪切的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我正在创建一个IE插件,需要在其中捕获浏览器屏幕(即仅显示网页的区域).这还需要是交互式的,用户可以在浏览器上剪切一个区域,并且所选部分应该由插件捕获为图像.

这是我在此网站上找到的链接
使用C#捕获整个Web页面的图像 [

Hi!

I am creating an IE plugin where I need to capture the browser screen (i.e., an area only where web page displays). This also needs to be interactive where user can clip an area on browser and the selected portion should be captured by plugin as an image.

This is a link which I found on this site
Image Capture Whole Web Page using C#[^]

Can anyone help me out in this please?

Thanks!
With Regards,
Fatima Khan

推荐答案

我将从该项目的胆量开始,然后使用生成的位图并提供一个供用户选择的界面.

将位图显示在屏幕上后,您将需要允许用户绘制一个框并调整其大小.您可以使用句柄"来允许他们更改其选择区域.您将使用该选择区域以及System.Drawing中的功能来提取有问题的图像部分.

如果您在开发此程序的某个方面遇到障碍或错误,请发布帖子,我们将尽最大努力为您提供帮助.

干杯,
-jc

编辑:此处"是指向进行裁剪的文章的链接:
裁剪并调整大小
I would start with the guts of that project, then use the bitmap generated and present an interface for the user to make their selection.

Once you put the bitmap on screen, you''ll need to allow the user to draw a box and resize it. You could use ''handles'' to allow them to change their selection area. You would use that selection area along with functions in System.Drawing to extract the portion of the image in question.

If you hit a roadblock or error on a particular aspect of developing this, please post and we''ll do our best to help.

Cheers,
-jc

EDIT: here''s a link to an article that does the cropping: Crop and Resize


这篇关于如何在C#中使用SHDocvw通过用户交互进行剪切的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆