?
Solved

geting the formshot

Posted on 2007-03-21
10
Medium Priority
?
194 Views
Last Modified: 2013-11-22
Hello,

Is it possible to take a window (form) screenshot in windows xp by reading it's canvas property and will that work if the window is mimimized or covered by another window? I know that you can draw on a form's canvas, read the content and store it as a bitmap and also by reading the canvas of the entire desktop you can get a screenshot, but can you get a formshot?

Thank you, Hrvoje
0
Comment
Question by:hdagelic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 15

Expert Comment

by:Jeff Perkins
ID: 18763438
Nope,
If the windows is minimized, you won't get the formshot/screenshot from properties.
Sorry
0
 
LVL 21

Expert Comment

by:ziolko
ID: 18763544
you can use BitBlt() function if you have handle of source canvas,
but when form is not shown or minimized you will not be able to take its snapshot
canvas contents are not stored all the time form is painted when becomes visible thru Paint method
(defined in TCustomControl) when control recives WM_PAINT message

ziolko.
0
 
LVL 21

Expert Comment

by:ziolko
ID: 18763556
sorry riteheer i didn't refresh my webbrowser

ziolko.
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 15

Expert Comment

by:Jeff Perkins
ID: 18763613
ziolko,
Is np, happens all the time, and just reaffirms the asker is getting good advice and plenty of attetion... <smile>
Good day,
Jappo
0
 
LVL 21

Expert Comment

by:ziolko
ID: 18763651
heh:) i just hope he's here for advice not attention :)

ziolko.
0
 

Author Comment

by:hdagelic
ID: 18763655
Ok, thanks,  that could be solved by intercepting WM_MINIMIZE or something like that and taking the formshot just before. But do you know if it would work if the window is under another window? I know that when you drag another window over a form it clears that area of a form, but it gets repainted... I also find it strange that googleing for formshots returns nothing special.
0
 
LVL 21

Accepted Solution

by:
ziolko earned 375 total points
ID: 18763707
i did this:
BitBlt(Self.Canvas.Handle, 0, 0, Form2.ClientWidth, Form2.ClientHeight, Form2.Canvas.Handle, 0, 0, SRCCOPY);

with form2 partly covered and result was same as on screen so also covered.

window repaints only that region which is visible, so i'm afraid answer is no again

ziolko.
0
 

Author Comment

by:hdagelic
ID: 18763748
You also couldn't get the shots with MDI child forms when reading the parent's canvas. True?
0
 
LVL 21

Expert Comment

by:ziolko
ID: 18763813
i didn't  try it with MDI but basically you can make snapshot of what you can see on monitor.

ziolko.
0
 

Author Comment

by:hdagelic
ID: 18765182
Shure, that's all I need, thanks.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question