Capture windows area

Capture windows area

Post by Peter Gas » Tue, 04 Jan 2005 15:29:42


Hello
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?

Thanks Peter
 
 
 

Capture windows area

Post by Mike D Sut » Tue, 04 Jan 2005 19:59:40

> I want for a small graph-app. a feature which enables capturing a visible

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://www.yqcomputer.com/ %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: XXXX@XXXXX.COM
WWW: http://www.yqcomputer.com/

 
 
 

Capture windows area

Post by Peter Gas » Tue, 04 Jan 2005 22:39:27

Thanks Mike for this simple and effective idea
Peter

"Mike D Sutton" < XXXX@XXXXX.COM > schrieb im Newsbeitrag

visible
with
that
if
the IE
current
display it on a full-screen borderless form, this way the
'freeze-frame' while they're making their selection (which of course
made then hide the full-screen window and resume capture
during the capture then you'd probably need to 'clip' the
http://www.yqcomputer.com/ %40TK2MSFTNGP11.phx.gbl
window lost focus and the user didn't know about Alt+Tab to