# VBForums UtilityBank > UtilityBank - Utilities >  Screen Shot (utility)

## VBDT

Easy and quick *Screen Shot*. Current version 3.1.4.0


*Description:*
Screen Shot has been created with Visual Basic.Net 2005. The application is user friendly and easy to use. It allows the user to take screen shot images and save them into the user predefined folder. I find it very useful with some music visualizations when I need to take screen shots.




*Feature list:*
Full screen image capture (all monitors).Object capture. The object can be window, control, windows shortcut menu etc.Rectangle-area image capture from the screen.Full web page image capture. New  :Smilie: Clipboard image capture.Active window image capture (with hot key).User defined application hot keys.All these captured images are (automatically or manually) saved into the user defined folder or clipboard.All the capture methods mentioned above will capture transparent images from the screen.JPEG Image quality setting.Can save the image in many image formats.Can capture a screen image with the cursor included (optional).Easy menu access (optional).Plays sound when the image is captured (optional).Automatically notifies for application update (optional).Starts the Screen Shot automatically when the system starts (optional).Help file.

*System Requirements:*
Windows NT/2000/XP/Vista/Windows 7Dot Net Framework 3.5 SP1
*License info:*
Everyone is permitted to copy and use the Screen Shot application freely for their personal needs. The only restriction is that the application as an entirety must not be an item for sell. If the Screen Shot should be used for commercial needs than permission is needed from the author of this application; from 'Arman Ghazanchyan'.

By installing and using the application you agree that the author of this application is not responsible for any damages that the application may cause to you.
Download the latest version *here*

----------


## Matt32

Hello 'Arman,

your example is great!!! I'm a Newbie but I would like learn from your example. Yes, I see your Sourcecode but unfortunately I don't understand all, without the Project files and the Designer Code.

It is possible that you can give me the project files and the Designer Code???

Best regards

Matt32

----------


## toecutter

Excellent ss capture program.
Thankyou very much.

Is the code that performs the docking off screen very difficult to produce.
What is that option called?
regards
toe

----------


## VBDT

Hi toecutter, finally got some time to write you back. I am not sure what you mean by docking off screen but I think you mean the red rectangle around controls or windows when an object is being captured.
If it is the one you are talking about than there are two ways you can do it:

1.	Have a transparent form and draw the rectangle on it.
2.	Draw directly on the desktop using Api functions.

I used the first one at the beginning but changed it with the second option because showing the rectangle form was closing the windows shortcut menu when it needed to be captured. But you should be careful using Api functions to draw on the desktop because it may crash the computer if it is not done right.

Hope I answered your question. By the way I updated the application so if you liked the previous version than you will like the update too. It got a help file and some small improvements.

Best regards,
VBDT

----------


## al_general

thank you man its good work

----------


## winneronline

You rule.

----------


## Rambo_Code

This will Be Very Helpfull Thanks man

----------


## Pamkkkkk

Hello !


*In my research to the error, i found, that is an Hardware Error of my Keyboard !!!  

So please Ignore the Error report !!!*

[Edit]

I can't Start your Application on my machine!

If i start i get on my (German) machine an Error, that points to a Internationalization fault! (see attached Image)


The error tells that there is a Problem with the Control Key.
(may be Problems with German Keyboard layouts)
The error Accours also if i set ALL Internationalizition setting to USA settings (region, language and keyboard options)

Error message Translation:
The FullScreenmodeHK Property coud not be set from Default Value.
The requested Value CTRL couldn't be found.

It's sad for me that i cant get the Sourcecode of this Project, so i can fix it by myself.[/Edit]


Ihave done my own Snapper  Application (see attached File) because there are a few things that your App is not on:

1. Need Intenationalization support (multilanguage) because I am working in a global factory for global users.

2. if you look at Professional tools like "Techsmith Snagit" they have a workflow Snap->Repaint/comment -> save.
My Intension was to send the Snapped Images automatical to Paint.NET.(because it is free)
My App is growen over it, so i can now send my Snapshot to almost every Application.

3. Save the settings for different Users.

perhaps we put our Codes together (your APP looks better  :Wink:   )

Updated Clipping.NET
Added Credits (VBDT) and change the send to App-window Function in use of the WindowhookLib (by Added VBDT)

see: http://www.vbforums.com/showthread.php?t=534404

----------


## VBDT

> Hello !
> 
> 
> *In my research to the error, i found, that is an Hardware Error of my Keyboard !!!  
> 
> So please Ignore the Error report !!!*
> 
> [Edit]
> 
> ...


Hi, I know that you have a problem with Screen Shot application and you have the German version of windows. I just want to make sure if you have no more problem with it do you? Can you use the Screen Shot now? By the way, nice app  :Smilie:

----------


## Pamkkkkk

> Hi, I know that you have a problem with Screen Shot application and you have the German version of windows. I just want to make sure if you have no more problem with it do you? Can you use the Screen Shot now? By the way, nice app


Yes your App is running fine now !


I have updated my App.
Added Credits (for you) and change the send to App-window Function in use of your WindowhookLib.

Thank you for your very clean, well documented Code and those super working Functions!  :Thumb:   :Thumb:   :Thumb:

----------


## cworkman29729

Can Someone Update This App To Work With Windows Vista?  :Alien Frog:

----------


## VBDT

> Can Someone Update This App To Work With Windows Vista?


What is the problem you are having?

----------


## cworkman29729

> What is the problem you are having?


Keep Getting The Error


Unhandled exception accrued in the application!

The application will exit. We are sorry for the inconvenience!



A dynamic link library (DLL) initialization routine failed

----------


## VBDT

> Keep Getting The Error
> 
> 
> Unhandled exception accrued in the application!
> 
> The application will exit. We are sorry for the inconvenience!
> 
> 
> 
> A dynamic link library (DLL) initialization routine failed


Could you upload the error text file that should be on your desktop?

----------


## cworkman29729

> Could you upload the error text file that should be on your desktop?


http://www.mediafire.com/file/o2gkz2...ScreenShot.log

There's The ScreenShot Log

----------


## VBDT

cworkman thanks for the file. As i can see the file the error happens when you exit the application. Is this right? I can see where the error happens and will investigate it. Also are you able to capture images and save them. Other words is this the only problem you are having?

----------


## cworkman29729

> cworkman thanks for the file. As i can see the file the error happens when you exit the application. Is this right? I can see where the error happens and will investigate it. Also are you able to capture images and save them. Other words is this the only problem you are having?



When I First Posted I was Getting The Same Error Everytime i Started the app! but i reinstalled windows and now i only get it when i shutdown windows! 

But yeah i can Capture & Save images!

----------


## VBDT

As I can see the error file your system has Service Pack 1 but I believe the minimum you should have Service Pack 2. The newest one is Service Pack 3. I would recommend you to update your windows by doing Start > All Programs > Windows Update. Please after updating the windows let me know if you have the same problem. I will try to recreate this error in my system and will post the resules in here.

----------


## VBDT

I just need one thing you do for me. Can you run the app and copy any image from the internet and see if Clipboard drop down item is enabled or not? Thanks!

----------


## cworkman29729

> As I can see the error file your system has Service Pack 1 but I believe the minimum you should have Service Pack 2. The newest one is Service Pack 3. I would recommend you to update your windows by doing Start > All Programs > Windows Update. Please after updating the windows let me know if you have the same problem. I will try to recreate this error in my system and will post the resules in here.


i have vista home basic which only has sp1

----------


## VBDT

> i have vista home basic which only has sp1


It is ok. I can see the problem, it is in another component that is used in the application. In my system it doesn't give a problem but i shold correct this and will update the application soon. But just to make sure, can you do the test i asked from you in my last post. Thanks!

----------


## cworkman29729

> It is ok. I can see the problem, it is in another component that is used in the application. In my system it doesn't give a problem but i shold correct this and will update the application soon. But just to make sure, can you do the test i asked from you in my last post. Thanks!


ok i tested it it was enabled but when i clicked the clipboard in the menu it my computer made some really weird noise's and then screen shot crashed

----------


## VBDT

> ok i tested it it was enabled but when i clicked the clipboard in the menu it my computer made some really weird noise's and then screen shot crashed


Try it again and if it happens again than I need the error file again to see what it wrong with that.

----------


## cworkman29729

> Try it again and if it happens again than I need the error file again to see what it wrong with that.


it did it again but didn't output a log!

----------


## VBDT

> it did it again but didn't output a log!


The first problem is fixed and the app is updated. For the  second problem I don't see any obviuse problem; I can't recreate It.
Edit***

----------


## cworkman29729

another bug report

Unhandled exception accrued in the application!

The application will exit. We are sorry for the inconvenience!



The parameter 'sectionGroupName' is invalid.

Parameter name: sectionGroupName

Log File

----------


## cworkman29729

Another Bug Report

Here's The Text From The Screenshot Log File

------------------------------------------------------------------

Screen Shot   Critical   1
==========================

System
---------
Utc Date:   4/2/2009 4:27:01 AM
Culture:    English (United States); en-US
OS:         Microsoft® Windows Vista Home Basic ; Win32NT; 6.0.6001.65536; Service Pack 1

Exception
---------
Type:       System.ArgumentOutOfRangeException
Source:     System.Windows.Forms
Assembly:   System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message:    Value of '529' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
            Parameter name: Value

Trace:      at System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
            at ScreenShot.RectangleForm.set_Rectangle(Rectangle value)
            at ScreenShot.RectangleForm.RectangleForm_LocationChanged(Object sender, EventArgs e)
            at System.Windows.Forms.Control.OnLocationChanged(EventArgs e)
            at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
            at System.Windows.Forms.Control.UpdateBounds()
            at System.Windows.Forms.Control.WndProc(Message& m)
            at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
            at System.Windows.Forms.ContainerControl.WndProc(Message& m)
            at System.Windows.Forms.Form.WndProc(Message& m)
            at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
            at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
            at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

----------


## Jovialjohn

Love the program except I keep getting a box popping up

Box title is Internet Explorer Script Error
An error has occurred in the script on this page.
Line: 701
Char: 1
Error: Object expected
Code: 0
Url: www.vbforums.com/showthread.php?p=2753948
Do you want to continue running scripts on this page?
Yes / No

Internet Explorer is not running (that I am aware of)

I hit yes OR no and the box reappears and eventually program crashes

Here is the log.

Screen Shot   Critical   1
==========================

System
---------
Utc Date:   8/27/2009 2:38:37 PM
Culture:    English (United States); en-US
OS:         Microsoft Windows XP Professional; Win32NT; 5.1.2600.196608; Service Pack 3

Exception
---------
Type:       System.Runtime.InteropServices.COMException
Source:     System.Windows.Forms
Assembly:   System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message:    The requested resource is in use. (Exception from HRESULT: 0x800700AA)

Trace:      at System.Windows.Forms.UnsafeNativeMethods.IWebBrowser2.Navigate2(Object& URL, Object& flags, Object& targetFrameName, Object& postData, Object& headers)
            at System.Windows.Forms.WebBrowser.PerformNavigate2(Object& URL, Object& flags, Object& targetFrameName, Object& postData, Object& headers)
            at System.Windows.Forms.WebBrowser.PerformNavigateHelper(String urlString, Boolean newWindow, String targetFrameName, Byte[] postData, String headers)
            at System.Windows.Forms.WebBrowser.set_Url(Uri value)
            at System.Windows.Forms.WebBrowser.Navigate(Uri url)
            at ScreenShot.MenuForm.CheckForUpdate()
            at ScreenShot.MenuForm.UpdateTimer_Tick(Object sender, EventArgs e)
            at System.Windows.Forms.Timer.OnTick(EventArgs e)
            at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
            at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

----------


## VBDT

Hi John,
Thank you for reporting the error. Most probably the error accurse because the web address of this thread is changed and if you specified the ‘Notify Update” property in the application properties every time it checks it raises this error. I recommend unchecking the ‘Notify Update’ property so it would not raise this error. Of course after this you should time to time check for the app updates manually.

Best regards,
VBDT

----------


## toecutter

A friend told me via phone he was getting a error when trying to install on vista.

I uninstalled the software and tried to reinstall and now i am getting the same error



I am using XP PRO SP3
regards
toe

----------


## VBDT

Hi toecutter, the count of files are 3 (Screen Shot Setup.zip, SCREE1.zip and SCREE2.zip). They all should be downloaded and present on the hard drive in order to be able to install the application. Those two files are the part of the setup file. I packed them in tree files because this forum allows only 500 KB file to upload but the setup file is bigger than that.

----------


## toecutter

Sorry for being so dumb  :Smilie:

----------


## toecutter

Arman

A friend is getting a error when trying to capture using the rectangle option, the full screen option works fine



regards

toe

----------


## VBDT

Hi Toe, I am aware of that error. It pops up some times but not always when the window border is dragged. I am leaving the country for a month and during that time I will try to fix the problem and post the fixed version of it here. Thanks for reporting the error.

Best regards,
VBDT

----------


## toecutter

Actually it may be due to a el - cheapo graphic card in the laptop that is running vista.

----------


## skea

Maybe my eyes are getting problematic.Is it possible to share the code? I would like to see if i can re-use the [popup from above the screen] kind of trick on a media app i am developing.
regards.

Ok. I seem to have seen the sourcefiles on codeproject. Let me take a look.

----------


## jareck

please can you share the code 
i really need the part of setting the image quality...

----------


## VBDT

> please can you share the code 
> i really need the part of setting the image quality...


Hi, I have the source files (no solution file) for download in CodeProjects website. Also I am providing the part that sets jpeg file quality. Note, you can only set jpeg file quality not the other file formats since they don’t support image quality property.

vb Code:
If myImageFormat IsNot ImageFormat.Jpeg Then
    'For all other formats
    img.Save(fileName, myImageFormat)
Else
    'For jpeg format
    Dim codecInfo As ImageCodecInfo = GetEncoderInfo("image/jpeg")
    If codecInfo IsNot Nothing Then
        img.Save(fileName, codecInfo, MenuForm.GetEncoderParameters(My.Settings.Quality))
    End If
End If

vb Code:
Private Shared Function GetEncoderParameters(ByVal quality As Integer) As EncoderParameters
        Dim myEncoder As Imaging.Encoder
        Dim myEncoderParameter As EncoderParameter
        Dim myEncoderParameters As EncoderParameters
         ' Create an Encoder object based on the GUID
        ' for the Quality parameter category.
        myEncoder = Imaging.Encoder.Quality
         ' Create an EncoderParameters object.
        ' An EncoderParameters object has an array of EncoderParameter
        ' objects. In this case, there is only one
        ' EncoderParameter object in the array.
        myEncoderParameters = New EncoderParameters(1)
        ' Sets the  quality parameter.
        myEncoderParameter = New EncoderParameter(myEncoder, quality)
        myEncoderParameters.Param(0) = myEncoderParameter
        Return myEncoderParameters
    End Function

----------


## skea

I want to Mimic the MenuForm animation. i have got something working but i cant seem to unhide the form when it has scrolled back into hiding. attached is the sample project. Its in C# though.
Any help will be appreciated. thanks.

----------


## skea

Resolved it. It was a border issue.

----------


## Gamemaster1494

this is awsome! It works perfectly! A+!

----------

