 |
|
 |
Can Anyone send me a link to get the remote system Screen Capture and display it on the local system or server
Thanks in advance
sushilsaini04@gmail.com
|
|
|
|
 |
|
 |
that's simplier, I tried and it worked the same.
Bitmap screen = new Bitmap(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height);
using (Graphics g = Graphics.FromImage(screen))
{
g.CopyFromScreen(0, 0, 0, 0, screen.Size);
}
pictureBox1.Image = screen;
[edit] I, now saw that this one was already posted. sorry.
|
|
|
|
 |
|
 |
When im playing a game (sample Left for dead) the capture is fake...
why?
|
|
|
|
 |
|
 |
Thank you very much for your contribution
Code4Fun&&$$$
|
|
|
|
 |
|
 |
i need a way to draw the mouse on the captured frame please
|
|
|
|
 |
|
 |
i'd like to know how to do that too
|
|
|
|
 |
|
|
 |
|
 |
I would like it to continue capturing screens even when the computer is locked...but the screenshot just shows black. Is there a way to accomplish this? (thinking of doing remote desktop when it is locked or under screen saver)
Thanks
JD
|
|
|
|
 |
|
 |
I think that before returning image in function GetDesktopImage() you should delete m_HBitmap
Image image = System.Drawing.Image.FromHbitmap(m_HBitmap);
PlatformInvokeGDI32.DeleteObject(m_HBitmap);
return (Bitmap)image;
|
|
|
|
 |
|
 |
public Bitmap GetDesktopImage(Rectangle rect)
{
Graphics graphics;
Bitmap bitmap;
bitmap = new Bitmap(rect.Width, rect.Height);
graphics = Graphics.FromImage(bitmap);
graphics.CopyFromScreen(0, 0, rect.Left, rect.Top, new Size(rect.Width, rect.Height));
return bitmap;
}
and that's it...
|
|
|
|
 |
|
 |
I like that much better. Thanks
|
|
|
|
 |
|
 |
is there a way to draw a mouse on the captured image ?
thanks in advace
|
|
|
|
 |
|
 |
But be aware about that CopyFromScreen has a memory leak of 1 GDI object per call
|
|
|
|
 |
|
 |
That is nice, but it doesn't play well with x64. Researching other options.
Hogan
|
|
|
|
 |
|
 |
Thank you for sharing.
Code4Fun&&$$$
|
|
|
|
 |
|
 |
Hello, I'm traying to make an aplication that capture the screen and make a video with thats images that I capture from the screen, but I have a serious problem with the memory, it up rapidly when I start running the aplication and only down when I close it. I need somebody that gide me to develop it, any sugestion is gratefull. My e-mail is sergio_ricardo03@yahoo.es
Thanks to everybody.
|
|
|
|
 |
|
 |
OK, first of all, someone has done it with a nice screen overlay: http://blogs.geekdojo.net/brian/articles/Cropper.aspx
But the real thing I came in here to post is that neither your app (nor hhis) can capture any window (such as the one from Cropper ) that is alpha blended (that is: partially transparent). The solution is extremely simple:
In your PlatformInvokeGDI32, define:
public const int CAPTUREBLT = 1073741824;
And then change:
PlatformInvokeGDI32.BitBlt(hMemDC, 0, 0, size.cx, size.cy, hDC, 0, 0, PlatformInvokeGDI32.SRCCOPY );
to:
PlatformInvokeGDI32.BitBlt(hMemDC, 0, 0,size.cx,size.cy, hDC, 0, 0, PlatformInvokeGDI32.SRCCOPY | PlatformInvokeGDI32.CAPTUREBLT);
--
::Jaykul <><
Lynch's Law: When the going gets tough, everyone leaves.
|
|
|
|
 |
|
 |
Adding this will allow you to capture selection rectangles and the resize rectangle of a form.
|
|
|
|
 |
|
 |
I make a thread that will call GetDesktopImage each 2 seconds to get the changes made on screen, but the problem i have that after 42 calls the function returned null... i did not find a logical reason for this.
any advice?
|
|
|
|
 |
|
 |
Well, I don't know why it would do it on 42 exactly (how many times did you test it?), but I will say that if you were going to call this repeatedly, you need to optimize the code so you're not getting the desktop window and resolution every time (hook the systemmetrics change message if you're worried someone would actually change resolutions while recording).
Honestly, you probably wouldn't even want to create/destroy the hBitmap every time, you could simply reuse it, and destroy it when your form was closing...
--
::Jaykul <><
Lynch's Law: When the going gets tough, everyone leaves.
|
|
|
|
 |
|
 |
Hello,
I am having problems with the little app,
I am getting it to work very well except for one thing, the memory.
It appears to never release any memory resources.
I can run it in a loop 20 times and watch the memory just skyrocket up, and never go down until the program closes.
I really need this utility to be able to run every few seconds or so over a large period of time.
Other than this its a great simple solution.
If anyone can please find a soution it would be greatly appreciated.
James Ratcliff
falazar@yahoo.com
|
|
|
|
 |
|
 |
Yea this is happening a lot to be also...
Any way to fix this?
|
|
|
|
 |
|
 |
I developed my own screen capture application and ran into similar
issues, but the way I resolved it is by calling the following method
after each screen capture to force the garbage collector to free
memory:
System.GC.Collect();
Hope this helps.
Gavin Kendall
http://gir.slampt.net/~gavin/
|
|
|
|
 |
|
 |
The root cause of memory leak problem is not freeing the memory allocated by bmp.GetHbitmap() inside the Imaging.CreateBitmapSourceFromHBitmap(bmp.GetHbitmap(), ...); To eliminate the memory, save the bmp.GetHbitmap() reference and then use GDI32.DeleteObject() to delete it, like: forBitmapSource = bmp.GetHBitmap(); bitmapSource = Imaging.CreateBitmapSourceFromHBitmap(forBitmapSource, ...); GDI32.DeleteObject(forBitmapSource); // <<< fixes the memory leak MSDN has the details on GetHBitmap()'s proper usage: http://msdn.microsoft.com/en-us/library/1dz311e4.aspx
JD
|
|
|
|
 |
|
 |
hi,
i'm not a proffisional in c# . so i wonder, how can u view the functions in this dll (gdi32 or usr32)????, although i tried to open them from the .NET but an error message appeared saying that i don't have the permission to do that ..
|
|
|
|
 |