Have my program screenshot its own entire form/windows & upload to ftp/email?
Ok so I've made a new program that I am running on 3 or 4 different user accounts on my pc. Just a basic program/form with 3 buttons and like the only control on it is a WebBrowser Control.
What i want to do eventually is have a control panel made in php which shows all the different programs in their current state (tiny screenshots of each form & what its doing).
Basically to let me know that the programs still running/not erroring. But for right now...a screen shot sent to my e-mail or to ftp would be simple enough & I could check it from my Android when I'm at class & unable to login via teamviewer/logmein.
I've got the code already for sending basic smtp e-mails & I'm pretty sure I can figure out how to do a simple ftp upload via a search function on vbforums.
Ok so #1...how do i do a screenshot of JUST my program & not the entire desktop. Is it possible to do from within the currently running application I wish to screenshot, or do i need to build another exe for it?
#2 So like...in your opinion...what would be the best way to tie the screenshot & smtp/ftp functions together & have any of you seen a request/forum post like this before?
Thanks a whole bunch guys! Back to wrapping Christmas presents lol!
J.
Re: Have my program screenshot its own entire form/windows & upload to ftp/email?
Basically you would start by creating a new Bitmap object with the same dimensions as the form. You could then call Graphics.FromImage and Graphics.CopyFromScreen to take a screenshot of a particular area. Better would be to call DrawToBitmap on your form, but I'm not sure that a WebBrowser will render properly. The problem with a screenshot is that your form may not be fully visible.
As for sending the image, you could just attach it to an email. The System.Net.Mail.MailMessage class documentation has a code example.
Re: Have my program screenshot its own entire form/windows & upload to ftp/email?
HI, two results I have found in relation to screen shots,
http://www.vbforums.com/showthread.p...enshot-to-jpeg...
and
http://www.johnkoerner.com/index.php...in-VB.Net.html
and you could also just upload the saved file to a web server with a webpage that loads the file. only have to look at the webpage :)