Hi, the code is missing a closing brace to end the GDI32 class. Try with the
following (only the } is new, the rest is just to show where in the code it
is):
---
public static extern int SelectObject(int hdc,int hgdiobj);
}
class User32
---
now derive a new Example and use the CaptureScreen as follows:
Example capScreen = new Example();
capScreen.CaptureScreen("c:\\test.bmp", ImageFormat.Bmp);
Hope this helps!
--
Yours sincerely,
Jacob Munk-Stander |
http://jacob.munk-stander.dk
"Tomomichi Amano" <to*********@hotmail.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
I asked how to "capture the screen" and a kind person replyed and told me
to use the code at
http://www.c-sharpcorner.com/Code/20...eenCapture.asp I tried to use the code, but when I build the code, it says "User32" is
not found, so I can't load the program. Exactly, how can I use this code? (I'm
a beginner)
Also, if there are anyother codes that I can use to capture the screen,
please send it to me.
Thank you in advance.