Pocket SnapIt 1.0
by Kingherc
ReadMe Contents:
Thank you for using Pocket SnapIt!
The program is free and by using it, you are encouraging its sharing.
Pocket SnapIt is a free, new, simple screenshot taker for .NET Compact Framework
devices and PCs. The aim of the program is to help users take full-screen screenshots
or screenshots of a fixed region automatically. Overview of features:
* Full-screen screenshots or screenshots of a fixed region.
* Consecutive screenshots (you can define the time interval).
* Automatically stores the screenshots in .bmp uncompressed format in the
directory you define and with the prefix you define.
* Features system sounds to make capturing easier.
* When the program is initiated, it 'listens' for the defined capture key. When
you press the key, you can either take a single screenshot or initiate/stop the
capture process for consecutive screenshots.
* Developers can execute the program with some command arguments so that the
program takes automatically a screenshot and save it.
In addition, Pocket SnapIt is also intended to help developpers for .NetCF development.
It contains useful classes such as File Explorer, API calls etc. Finally,
it's an example of cross-platform programs. It customizes itself automatically for
different platforms (PCs, Pocket PCs 2003 or later, Smartphones 2003 or later, in
one executable file).
Also, be sure to read Licence.txt and GPL.txt and this ReadMe.htm before using
the program or the source in any way! These files can be found in the directory of
the program (usually Program Files\Pocket SnapIt) which you can find through the file
explorer of your device.
Any help in the development of this program is appreciated!
Also, in some PCs or devices the font size of this readme may be strange and uncomfortable.
Check if your browser has options for changing the text size.
There are different setups for different devices. You need to know which setup/package you've downloaded to follow the setup instructions for it. The following instructions apply to the original distribution packages for the following devices:
PC:
For the PC, there's an executable file (.exe) you need to run to install the program.
The setup has some steps you need to follow in order to complete the setup.
Pocket PCs 2003 or later:
For pocket pcs, there's a cabinet (.cab) file you need to run to install
the program. To run the file, you need to place it somewhere in your device, then
run the file explorer of your device, go where you placed the file, and click the
file. The installation of the files will then take place. When finished, you'll find
the shorcut of the program in Start > Programs.
Smartphones 2003 or later:
Follow the same instruction for Pocket PCs 2003 or later for your cabinet
file (the pocket pc and smartphone cabinet files are different).
Universal package:
This package is the main original distribution package for the program. It
contains both the executable and the source form of the program and the program is
to be installed manually. The package will have some folders, one of which is named
"Pocket SnapIt". Use the file explorer of your device to go to this directory. Right
click this folder and select Copy. Then, go to where you want to store the program
(e.g. the Program Files folder) and right-click and paste the folder.
If you also want a shorcut, then go into the folder and find Pocket SnapIt.exe. Right
click it and click Create Shorcut. A shorcut will be created which you can also rename.
Cut the shorcut and go to your windows directory. Open Windows > Start Menu >
Programs (or something like that, or C:\Documents and Settings\All Users\Start Menu
for windows xp), where you will find the directories of your start menu. Right click
and Create a Folder with the name Pocket SnapIt. Open it and paste the shorcut there.
As the program you just installed was not installed by a setup program, it won't have
an uninstall feature. To uninstall the program, you need to delete all the folders,
files and shorcuts you've cut/pasted/created in the above steps.
3) Instructions of Use top
3.1) Description of capture process top
To use this program efficiently, you need, first of all, to know how it works. The
program is based on the options you supply to it. According to them, it can do different
jobs.
The program when started (by clicking the "Start" button), starts "listening" for
the click of the capture key defined. When the capture key is clicked, then the capture
process begins.
The capture process is divided in two modes that you can choose from:
1st mode (full-screen): The program takes a screenshot
of the screen and saves it to the desired directory, with the desired prefix and the
desired number of digits in the end. If also desired, a system sound is played upon
capture.
2nd mode (fixed region): The program takes a screenshot
of the fixed region of the screen and saves it to the desired directory,
with the desired prefix and the desired number of digits in the end. If also desired,
a system sound is played upon capture.
The above process is followed when a single screenshot is taken. But you can also
make the program take automatically consecutive single screenshots in a defined time interval.
For example, if you choose to take consecutive screenshots in a 5 second interval
(5000 milliseconds), the above process is executed each 5 seconds after the capture
process is initiated (when the capture button is clicked). To stop this repetition
of the capture process, you only need to reclick the capture button.
When you initiate a capture process that will be repeated (~ consecutive screenshots),
the click of the capture button plays a different system sounds than the one
played when a single screenshot is taken. This sound is played always (even if you
disable the screenshot sound). The same sound is played when you reclick the capture
button to end the repetition of the capture process. These sounds will help you know
when the repetition of the capture process is started or stopped.
When you finally need the program to stop all of its processes (stop the capture process and stop listening for the capture button click), you can click the "Stop" button that has taken the place of the "Start" button.
The main screen of the program is the one shown first upon startup. In the main screen,
there is the description of the options chosen that define the capture process. You
can see the capture mode chosen, the interval of the repetition (if chosen), the capture
/ snap button defined (if it's not the default, there will be a 'value' of the key
and not its name), if the capture sound is to be played at each screenshot and
where the next screenshot will be saved.
Through Start, the program starts listening for the snap / capture button.
If the snap button is clicked then, the capture process is initiated (or stopped in
the case of a repetition - consecutive screenshots). When you reclick the start button
(which will be now named Stop), the program stops all of its processes and also stops
listening for the snap button.
Through Menu > Options, you can access the Options screen where you can change
the current options that define the capture process.
Thorugh Menu > Licence, you can read the licence of the program.
Through Menu > About, you can see general information about the program.
Through Menu > Exit, you can exit the application safely. Options are also automatically
saved.
Through this screen, you can choose the options of the program and of the capture process (these options are automatically saved in the program's directory in options.xml and are automatically loaded upon startup). More information on how these are used in section 3.1. The options are divided in several categories. When finished changing them, click Done.
1. General:
Here you can choose the mode of the capture process. It can either be a full-screen
screenshot or a screenshot of a fixed region. If you select the second mode, then
the coordinates of the rectangle of the fixed region are shown under the checkbox.
To change these coordinates click Menu > Select fixed region.
2. Consecutive Snaps:
Here you can choose if the capture process is to be automatically repeated
in a defined time interval. To enable this feature, check the checkbox and define
the time interval in milliseconds in the textbox.
3. Save Options:
Here you can choose where and how the screenshots are saved. To change the
store directory, click Menu > Select Store Directory. To change the filename
prefix, change the second texbox. To change the number of digits in the end of the
filename change the third textbox. The number of digits is the least numbers of digits.
That is: if you select 2 digits, then the automatic enumeration would result
in a series of filenames such as: "Snap01.bmp","Snap02.bmp",...,"Snap14.bmp",...,"Snap99.bmp","Snap100.bmp",...,"Snap345.bmp"...etc.
4. Capture Options:
Here you can choose the capture options. If you want the program to play
a system sound at each capture (of every single screenshot), check the first checkbox.
Then, you can also define the capture / snap button by clicking Menu > Select Capture
Button.
5. Miscellanious:
These options are advanced and should not be used for normal screenshot
taking. If the first checkbox is checked, then when the program starts, it automatically
starts listening for the capture button (as if the Start button was clicked). If the
second checkbox is checked, then when the program starts, it automatically starts
listening for the capture button (as if the Start button was clicked), it automatically hides
itself and automatically initiates the capture process (as if the capture button
was clicked).
If you've accidentally chosen the second option and do not know how to reverse it:
Open the Options.Xml file found in the program's directory with a text editor and
in the SnapImmediately field, change the True to False.
3.4) Selecting fixed region screen top
Through this screen, you can choose the rectangle of the fixed region to be captured
through the capture process (in mode 2). When the screen is shown, you are presented
with a full-screen screenshot with a cursor in the middle. To move the cursor, use
the navigation keys of your keyboard (or click on the screenshot, if your device has
a pointer). To define the first corner of the rectangle, click the return/enter key.
Then move the cursor to the other corner of the rectangle and click again the return/enter
key to select the current rectangle. Click Done when finished, or Menu > Reset,
to reset this process.
To decrease or increase the step of the cursor (how fast the cursor moves), click
keys 1 or 2 of your keyboard. The step is shown in Menu > Step.
Note: As the screenshot is larger than the area of the window, when the cursor surpasses
the borders of the window, the screenshot is moved so that you can see the part that
was hidden.
3.5) Directory Explorer screen top
Through this screen, you can choose the directory where you can store the screenshots.
The directory must exist. If it doesn't, you need to create it first through the File
Explorer of your device. When you first see this screen, you are presented with a
treeview of your My Documents directory. Clicking on the "plus" and "minus" signs
makes it possible to show or hide folders. To choose a folder, just click on it, or
navigate to it. If it's highlighted, then it's selected. When you've selected your
desired directory, click Done.
To change the root directory of the treeview (e.g. C:\ instead of My Documents), click
Menu > Load Directory > and one of the menu buttons to load that directory.
3.6) Re-showing the program window top
Due to some complications, I figured that when the program has started listening and
you throw it in the background, by pressing the home button for example, it's not
easy to re-show it after that. (1) One way to do this, is to click on the program
shorcut again. If this does not succeed, then there's another solution (2) : When
the program listens for the capture button, if you press it for more than 1.5 seconds,
then the main screen will appear on top of the screen. The only drawback about this
method, is that the capture process may be initiated several times while you press
the capture button for the 1.5 second.
(3) Another more complicated way to show the program window is going to the task manager
of your device (for PCs: press ctrl+alt+del, for smartphones: Start > System Management
> Task Manager, for pocket pcs: Start > Settings > System > Memory >
Running Programs), clicking Pocket SnapIt and clicking "activate" or "go to" or "show".
Note: If the program automatically hid itself (that is if the miscellanious option
"Snap immediately" is checked upon startup of the program), then the program appears
only as a process and not as an application. Usual task managers of devices do not
show processes, so you need to use a third-party task manager that supports showing processes
(if you follow the aformentioned third method to show the program window). In any
way, the second method is the most efficient one in most cases.
4.1) Compiling the executable top
In the original universal distribution package of the program, you can also find
its source. Its source is in visual basic .net. The project is developed with SharpDevelop
from icsharpcode.net. This program is an advanced free .NET development environment
which substitutes other popular non-free environments. Although development in vb.net
is nice, it doesn't support .netcf programming for vb.net directly. So, you have to
compile the project yourself through command line by executing the vbc.exe compiler
of your .net sdk. This compiler can be normally found at C:\WINDOWS\Microsoft.NET\Framework\[sdkversion]\vbc.exe
(you can find more information about the command arguments you have to pass to it
in your .net sdk by searching vbc.exe in the index). An example of the command arguments
you have to pass through the command line can be found in the upper comments of the
Main.vb source.
So, to compile the executable: Open the command prompt of your PC (Start > Programs
> Accessories > Command Prompt), copy the exact line of arguments you want to
pass (something like the commented -without the " ' " - line in the main.vb
source. Of course, you need to change the directories to match those on your
PC.) and right-click and paste and click enter/return. Done.
Note: As you'll note in the command arguments, you also need to have the compact framework
sdk so that you can target it through the command arguments. As this is not directly
available from Microsoft, you can download Microsoft .NET Compact Framework 1.0 (or
SP), extract it to a folder and target this folder in the /sdkpath argument. Before
targeting to this directory, you need to rename the files in the original .dll filenames.
This renaming process is presented somewhere in SharpDevelop's wiki. I found it on
page http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.CompactFrameworkDevelopment.
Note 2: The .resources file contains all of the resources used by the program. To
edit this file use SharpDevelop.
The original distribution package does not contain any setup (~ executable) but it contains general notes for installing the program manually on each device. That is because each device needs different setups and because the original distribution package also contains the source. Here are instructions for compiling the setup for each device:
For PCs:
For PCs, I've used a very useful free program named Inno Setup 5 (you need
to download this if you wish to follow this method). For the creation of the setup
you just need to load the script file I've created and is named "Setup.iss". When
you load this script file in Inno, you just need to change the directory where you
store the program files to be included in the setup. Then Build > Compile the setup
and Run > Run it. The setup file will be saved in the Output folder.
For Smartphone:
For smartphones, you need to have installed Microsoft Smartphone 2003 SDK.
If so, you have to run cabwizsp.exe through command-line with some arguments targetting
the install.inf file I've made. The command line you need to run in the command prompt
is the one shown in the cabwizsp comment in the upper part of the main.vb source file.
For Pocket PCs:
For pocket pcs, you need to have installed Microsoft Pocket
PC 2003 SDK. If so, you have to run cabwiz.exe through command-line with some
arguments targetting the install.inf file I've made. The command line you need to
run in the command prompt is the one shown in the cabwiz comment in the upper part
of the main.vb source file.
4.3) Invoking the program with command arguments top
The program's executable file can also be run with command arguments that define the options to be used in the capture process. These options will not be automatically saved if the program is exited. Also, the miscellanious options (start / listen and/or snap immediately) are mainly used in these command arguments, as you'll mostly need the program to automatically take screenshots.
Usage of command arguments: -[command]:[example value] (explanation)
-m1 (mode 1 - full-screen) -m2 (mode 2 - fixedregion) -con (consecutive snaps) -int:100
(100 milliseconds consecutive timer interval. Will be used only if -con is defined)
-frx:1 (fixed region's x. Will be used only if -m2 is defined) -fry:1 (y) -frw (width)
-frh (height) -sd:"C:/" (store directory of the final screenshots .bmp files) -sp:"Snap
Shot" (file prefix) -sn:3 (filename minimum digits) -ps (play capture sound) -snapbtn:40
(virtual key value -search msdn for these values- of the snapshot button to be used)
-listen (starts listening for snapshot button immediately) -snapim (starts capture
process immediately
e.g. "Pocket SnapIt.exe" -m1 -sd:"C:/" -sp:"Snap Shot" -sn:3 -ps -snapbtn:40 -snapim
As said before, these command arguments just define the options. So, the same result
would be achieved if you define the options from within the program and exit the program
(so as to save them).
Also, if the options are invalid, you'll be presented with an invalid options messagebox.
The options will be loaded to the defaults. If this happens, you need to recheck the
validity of your command arguments. For example, the interval cannot be less or equal
to 0.
More information about the program can be found at http://www34.brinkster.com/kingherc/. Also, you can contact me at king_herc@yahoo.com.
Thanks to the following who/which helped a lot in the development or functionality
of the program:
ICSharpCode.Net for their free program SharpDevelop.
XrossOne for their wonderful and most useful XrossOne Mobile GDI+ library.
www.EggHeadCafe.com for making available the Business Icons set of Lokas Software free on their website.
Inno Setup program for being free and kind of professional.
Of course Microsoft for their extraordinairy free .NET Framework and their most useful
Windows Mobile platforms as well as for the extensive support of their programs and
for much more.
Object Desktop's free Icon Developper for being free and kind of professional.
Microsoft's Asp.Net Web Matrix (free) for webpages.
...and many more programs and people that don't pop in my mind now but have helped
in the development of this program!