Capture Screen to Byte Array

G

Guest

I'm a VB.net user. I have difficulty in capturing screen and convert it to an
array of byte -- it seems not easy to do with compact framework.

I have little knowledge about bitblt but am not sure if it help. I assume
the followings are the right steps to do.

1. get HDC of the screen using GetDC
2. create a bitmap and get HDC of it (how???!)
3. use bitblt to copy the screen content to the bitmap
4. convert bitmap into byte array (how? again)

Are they make sense? I will appreciate if there's any useful VB code provided!
 
G

Guest

Thanks for you answer

Is there any mirror site of http://www.opennetcf.org/sdf/ ? this web site
returns runtime error



Sergey Bogdanov said:
See the OpenNETCF.Drawing.GDIPlus.Snapshot method from SDF:
http://www.opennetcf.org/sdf/

And source code (sorry, not VB but C#) is available here:
http://vault.netcf.tv/VaultService/...wing/GDIPlus.cs&version=5&includedversions=20

u/p: guest/guest


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

I'm a VB.net user. I have difficulty in capturing screen and convert it to an
array of byte -- it seems not easy to do with compact framework.

I have little knowledge about bitblt but am not sure if it help. I assume
the followings are the right steps to do.

1. get HDC of the screen using GetDC
2. create a bitmap and get HDC of it (how???!)
3. use bitblt to copy the screen content to the bitmap
4. convert bitmap into byte array (how? again)

Are they make sense? I will appreciate if there's any useful VB code provided!
 
G

Guest

It's back up. We'd run out of disk space.

-Chris


Keith said:
Thanks for you answer

Is there any mirror site of http://www.opennetcf.org/sdf/ ? this web site
returns runtime error



Sergey Bogdanov said:
See the OpenNETCF.Drawing.GDIPlus.Snapshot method from SDF:
http://www.opennetcf.org/sdf/

And source code (sorry, not VB but C#) is available here:
http://vault.netcf.tv/VaultService/...wing/GDIPlus.cs&version=5&includedversions=20

u/p: guest/guest


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

I'm a VB.net user. I have difficulty in capturing screen and convert it
to an
array of byte -- it seems not easy to do with compact framework.

I have little knowledge about bitblt but am not sure if it help. I
assume
the followings are the right steps to do.

1. get HDC of the screen using GetDC
2. create a bitmap and get HDC of it (how???!)
3. use bitblt to copy the screen content to the bitmap
4. convert bitmap into byte array (how? again)

Are they make sense? I will appreciate if there's any useful VB code
provided!
 
G

Guest

Thanks! I have access to it now.

I'm trying to compile to cs class to a dll file and use the following code
in VB.net so I can access the method.

Public Declare Sub Snapshot Lib "<compiledFileName>.dll" (IntPtr hReal,
string FileName, Rectangle rect)

However, is the OpenNETCF.Drawing.Imaging reference available for public?

It's back up. We'd run out of disk space.

-Chris


Keith said:
Thanks for you answer

Is there any mirror site of http://www.opennetcf.org/sdf/ ? this web site
returns runtime error



Sergey Bogdanov said:
See the OpenNETCF.Drawing.GDIPlus.Snapshot method from SDF:
http://www.opennetcf.org/sdf/

And source code (sorry, not VB but C#) is available here:
http://vault.netcf.tv/VaultService/...wing/GDIPlus.cs&version=5&includedversions=20

u/p: guest/guest


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Keith wrote:
I'm a VB.net user. I have difficulty in capturing screen and convert it
to an
array of byte -- it seems not easy to do with compact framework.

I have little knowledge about bitblt but am not sure if it help. I
assume
the followings are the right steps to do.

1. get HDC of the screen using GetDC
2. create a bitmap and get HDC of it (how???!)
3. use bitblt to copy the screen content to the bitmap
4. convert bitmap into byte array (how? again)

Are they make sense? I will appreciate if there's any useful VB code
provided!
 
G

Guest

I have found the answer. I can simply download the installation files. Cheers

It's back up. We'd run out of disk space.

-Chris


Keith said:
Thanks for you answer

Is there any mirror site of http://www.opennetcf.org/sdf/ ? this web site
returns runtime error



Sergey Bogdanov said:
See the OpenNETCF.Drawing.GDIPlus.Snapshot method from SDF:
http://www.opennetcf.org/sdf/

And source code (sorry, not VB but C#) is available here:
http://vault.netcf.tv/VaultService/...wing/GDIPlus.cs&version=5&includedversions=20

u/p: guest/guest


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Keith wrote:
I'm a VB.net user. I have difficulty in capturing screen and convert it
to an
array of byte -- it seems not easy to do with compact framework.

I have little knowledge about bitblt but am not sure if it help. I
assume
the followings are the right steps to do.

1. get HDC of the screen using GetDC
2. create a bitmap and get HDC of it (how???!)
3. use bitblt to copy the screen content to the bitmap
4. convert bitmap into byte array (how? again)

Are they make sense? I will appreciate if there's any useful VB code
provided!
 

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

Top