How to read pixels under a form

  • Thread starter Thread starter MrAsm
  • Start date Start date
M

MrAsm

Hi,

I would like to create a form and read the pixels of the layer under
my form (think of a kind of magnifier glass), to do some processing on
them.

Do you have any idea about how to do this?

How can I read pixels under a form?

Thanks in advance
MrAsm
 
Here is a FAQ entry showing how to get a bitmap of a form.

http://www.syncfusion.com/faq/windowsforms/Search/870.aspx

Once you have a bitmap, you can use Bitmap methods (like GetPixel) to
access pixels.

Thanks, but I think this is not what I'm looking for...

I'm not interested in capturing the form's bitmap; I'm interested in
capturing what is behind (under) the form.

Imagine the form is a kind of magnifier glass, and I would like to
process what's under the form.

An approach would be:

1. get form's rect (top, left, right, bottom)
2. hide the form
3. capture what is behind the form, i.e. capture the desktop bitmap in
the above rect region
4. show the form
5. process the bitmap and update form content

....but I was wandering if there is a more efficient way than
continuous hiding/grabbing bitmap/showing.

MrAsm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top