Visual Basic Screenshot

Thread Starter

Dritech

Joined Sep 21, 2011
907
Hi,

Is it possible to do a program with Visual Basic where the user inputs 10 different names and every time the SPACE key is pressed, a screenshot is captured which is saved using the pre-inpputed names ??

Thanks in advance.
 

Synaps3

Joined Jun 5, 2013
99
Yes, it is. Before I start going into detail, I need to be sure I understand you correctly. So there's one text field on the screen that the user types into. Whenever the space key is pressed it takes a screenshot and then saves it to a file in the same folder as the program with the name of the last entry + ".jpg". Let me know if this sounds good. I can just write the whole source code for you if you'd like.
 

Thread Starter

Dritech

Joined Sep 21, 2011
907
Hi Synaps3 ,

Thanks for your help :) This is how I was planning to do it:

*First the user select a path for where he wants to save the screenshots (ex: desktop)

*The user is then asked to input different names in a text field. There is no limit of how many names the user can input. (so lest assume the user inputs three different names, which are Screenshot1, Screenshot2 and Screenshot3).

*After the user press the Next button, the program will capture a screenshot every time the Space key is pressed. The screenshots will automatically be saved to the Desktop (or whatever the path) according to the names given in step 2. (i.e. Space key is pressed- a screenshot is captured and saved as Screenshot1, Space key is pressed for the second time- a second screenshot is captured and saved as Screenshot2 ....)

Thanks for your help and sorry for my poor English.
 

Thread Starter

Dritech

Joined Sep 21, 2011
907
Are you trying to capture screenshots of the display resulting from some other software that's running?
Yes I have a software with constantly changing results. I did find an off-the-shelf software to take multiple screenshots, but it will not allow you to give each image a name beforehand.
 

sirch2

Joined Jan 21, 2013
1,071
Interesting challenge, especially in VB. For a standard application you are going to have a problem that your program will not have focus (i.e. it will not be receiving keyboard inputs) after you have started the other application. Your program could be a very small window in one corner that you click on and then press the space bar to capture the screen. Or you could minimize to the Sys Tray at the bottom right and then click on the Sys Tray icon to do the screen shot rather than pressing the Space Bar. Alternatively you can write a system wide keyboard hook that would send key events to you application even if it is in the background but that is fairly low level...
 

panic mode

Joined Oct 10, 2011
5,196
why specially in VB? VB is a very powerful programming platform. like any programming task it should be broken down and solved in smaller pieces. just need to place keybd hook and there is tons of code examples...
 
Top