Re: Capture windows area

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Peter Gast (peter.gast_at_tiscali.de)
Date: 01/03/05


Date: Mon, 3 Jan 2005 14:39:27 +0100

Thanks Mike for this simple and effective idea
Peter

"Mike D Sutton" <EDais@mvps.org> schrieb im Newsbeitrag
news:%23zpFTNY8EHA.2156@TK2MSFTNGP10.phx.gbl...
> > I want for a small graph-app. a feature which enables capturing a
visible
> > area of the desktop. The code works almost fine when I move a rectangle
with
> > the mouse the area inside this rectangle is captured. The problem is,
that
> > in some cases some object get the focus and change their colors (for ex.
if
> > you make a rectangle were an icon of the desktop is inside, or inside
the IE
> > pictures can get focused and changes). How can I avoid that this occurs?
> > How can I draw visible rectangle to give the user a feedback of the
current
> > area?
>
> A common technique is to make a screen capture of the entire desktop and
display it on a full-screen borderless form, this way the
> user still sees what the desktop contains but effectively has a
'freeze-frame' while they're making their selection (which of course
> won't change when the mouse hovers over it.) Once the selection has been
made then hide the full-screen window and resume capture
> of the desktop area as you would.
> If you want to stop the user from moving the mouse over the active area
during the capture then you'd probably need to 'clip' the
> mouse cursor as in this post:
>
http://groups.google.co.uk/groups?selm=Oj5dEKMFDHA.2824%40TK2MSFTNGP11.phx.gbl
> You may want to add an automatic unlock on a timeout though in case your
window lost focus and the user didn't know about Alt+Tab to
> switch it back.
> Hope this helps,
>
> Mike
>
>
> - Microsoft Visual Basic MVP -
> E-Mail: EDais@mvps.org
> WWW: http://EDais.mvps.org/
>
>



Relevant Pages

  • Re: java.awt.Robot - new programmer, need a little help.
    ... There are other apps out there that allow a user to select an ... rectangle within the grid and auto save that image to a defined ... provides faster recording. ... Why not just capture the whole screen in the first place? ...
    (comp.lang.java.programmer)
  • Re: Capture windows area
    ... > the mouse the area inside this rectangle is captured. ... A common technique is to make a screen capture of the entire desktop and display it on a full-screen borderless form, ... Once the selection has been made then hide the full-screen window and resume capture ... You may want to add an automatic unlock on a timeout though in case your window lost focus and the user didn't know about Alt+Tab to ...
    (microsoft.public.vb.winapi.graphics)
  • Re: image acquisition via screenshot
    ... it only works if I capture a rectangle inside the figure. ... I run Matlab on a remote host and export the display to my XServer. ...
    (comp.soft-sys.matlab)
  • Capture part of the PocketPC-screen?
    ... The aim is to draw a rectangle with a SolidBrush in the needed ... background-color somewhere outside the visible screen, ... Now I need to find a possibility how to capture a given region of the screen ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: My custom control has issues
    ... Ultimately I have written a new control using pieces of zoompicbox as a skeleton and it's working pretty well, but there are some problems. ... This control is called PixelViewer and that's its purpose: to view an image and let you zoom in and see the pixels as pixels, not a smoothed image. ... Since GDI+ doesn't allow for XOR drawing, I've resorted to using GDI to drawing my rubber-band selection. ... That part works fine, but when I draw the final selection rectangle I get a black box, not inverted colors. ...
    (microsoft.public.dotnet.framework.drawing)