Tuesday, December 21, 2010

Snappy- Desktop area snapshot tool (Stupid App)

Download

You can download the installer from here.

Following is the brief instructions manual.

Startup

It creates a system tray icon near your clock in the lower right corner of your screen.

Run-time

There are two ways to start capture,
1.       Right click on the Snappy icon in the system tray and click Capture
2.       Press the hot key, default hot key is Control + Shift + Q
Once the capture is triggered, the screen will get covered by the capture window depending on the Opacity setting (see below for detail). At this point, the user can click on the screen to define the first point of the rectangle and without lifting the mouse button up, the user can drag the mouse to draw a rectangle. This will define the rectangular area for the area to be captured on the screen. Once the mouse button is lifted up, the captured area snapshot will be stored in the clipboard and a new window will be popped up for you to store the captured image.

Configuration

Right click on the Snappy icon in the system tray and click config to open up the configuration dialog. It will open a dialog like this:

By default, it fills up with the default settings; you can change them as per your requirements.

Image Folder

This is the folder where the snapshot images will be saved.

Hot Key

This is a keyboard key combination to start capturing

Capture background Color

This is the color of the main capture window background

Rectangle Color

This is the color of the rectangle when dragging the mouse for capture

Opacity

This is the percent opacity of the capture window

Auto Save

This setting defines if you want your captures to be saved automatically on the disk

Save As

This setting decided the format of the captured image file. Currently, it supports BMP JPG and GIF.

Thursday, February 11, 2010

Windows Effects (Stupid App)

Hello again.

Since my previous project is not going anywhere right now. I worked on this yet another (useless) fun app. I call it Windows Effects!!!

It is a simple application. What it does is that when a window from your desktop gets minimized or destroyed, it shows a fireball kinda effect. That's it.

This was to learn how to capture windows shell events in .NET. I could not find a way to do it in the .NET anyways so, I am using a DLL written in C++ for this purpose. I found this DLL on the web.

The effect works most of the time but still it's flaky. Sometimes it doesn't capture the events properly.

Anyways, here it the link for you to try. It's an installer. You should be albe uninstall the application after trying it out without any problem.

Ohh btw, you will need .NET 3.5 SP1 framework for it work.

Wednesday, February 10, 2010

How to not let Google Buzz clutter your GMail (Tip)

Alright people, Have you started using the Google Buzz? Loving it? Hating it? Well, I started using it since last night and it looks alright. Not sure if I will stick to it and abandon the Facebook altogether. Anyways, one annoying thing I noticed is that Buzz send me the notification if someone comment on my buzz or so. It clutters my GMail and in my attempt to clean it, I tried to delete the notification email. But that deletes the original buzz too. :( So, I created a filter to archive all the Buzz notification and apply a label to it. Follow these steps:
  • Create a label called "Buzzz". You can't use "Buzz" because it is a reserved word.
  • Go to Setting in the upper left corner of your gmail
  • Click on Filters
  • Click on Create a new filter link in the bottom
  • In the Create a Filter windows, Type in "Buzz:" in the subject field (Image 1 below)
  • Click Next Step
  • In the next window, check the check boxes 1. Skip the inbox checkbox and 2. Apply the label (Image 2 below)
  • Pick the Buzzz label you previously created (Image 2 below)
  • Click Create Filter
Image 1:

Image 2:


If you want to completely shut the buzz notifications off, you can click on Turn Off buzz link all the way in the bottom of your gmail.


Cheers...

Monday, February 1, 2010

AirPointer (Stupid App)

My next project is going to be AirPointer!! :) Now, someone in the past might have done this type of work already but, I am doing it just for the learning purpose. AirPointer as per my thinking is going to control the mouse pointer by pointing any object in the web cam or your hand gestures.

It seems like very difficult project for me 'cause I don't have background of computer vision, etc.

Anyways, I am thinking of completing the project in following sections:
  • Learn how to capture the web cam image and show live on the screen
  • Object or gesture detection (very tough!!! can be a show stopper)
  • Move mouse pointer based on the detection
I will keep updating this blog as I go on with this project.

Friday, January 29, 2010

TrafficLights (Stupid App)

Introduction

I wanted to see the network activity other than in the system tray network icon, so I thought of using the keyboard's CAPS LOCK, SCROLL LOCK, and NUM key LEDs to display the network activity. TrafficLights is a simple application which blinks keyboard lights based on the network traffic on your computer. You can configure which light should blink on send or receive packets. It silently sits on your system tray. You can right click on TrafficLights' system tray icon to configure the LEDs or shut it down.

Background

This is just to learn how to trap network traffic and control keyboard LEDs in .NET.

Using the Code

There are basically two parts to this application:

  • How to identify network traffic.
  • The code below is used to initialize the PerformanceCounter class instances - one for send and one for receive (namely m_performanceCounterSent and m_performanceCounterReceive). They are initialized like so:


    //
    m_performanceCounterCategory = new PerformanceCounterCategory("Network Interface");
    string instance = m_performanceCounterCategory.GetInstanceNames()[0]; // 1st NIC !
    m_performanceCounterSent = new PerformanceCounter("Network Interface",
    "Bytes Sent/sec", instance);
    m_performanceCounterReceived = new PerformanceCounter("Network Interface",
    "Bytes Received/sec", instance);
  • How to control keyboard LEDs.
  • A background thread keeps running in the application, and it keeps on checking on the performance counter to check any network activity. And when an activity is detected, it blinks the configured keyboard LED.


    float fSentValue = m_performanceCounterSent.NextValue() / 1024;
    float fReceivedValue = m_performanceCounterReceived.NextValue() / 1024;
    if (fSentValue > 0)
    {
    keybd_event((byte)m_sendLED, 0x45, KEYEVENTF_EXTENDEDKEY, (UIntPtr)0);
    keybd_event((byte)m_sendLED, 0x45,
    KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, (UIntPtr)0);
    }
    if (fReceivedValue > 0)
    {
    keybd_event((byte)m_receiveLED, 0x45, KEYEVENTF_EXTENDEDKEY, (UIntPtr)0);
    keybd_event((byte)m_receiveLED, 0x45,
    KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, (UIntPtr)0);
    }

Final words

As I mentioned earlier, it's a very simple application, but the intention was to learn how to trap network traffic in ।NET.

Files

Demo
Source Code

Thursday, August 14, 2008

Visual Studio 2008 Hotkeys (Tip)

Concluding the Keyboard Shortcuts posted here before.
  1. Reformat Code: CTL-K, CTL-D reformats code
  2. Collapse Code Sections: CTL-M, CTL-O
  3. Surrond selection with...: CTL-K, CTL-S (helpful in creating code regions)

Edit

Edit.CollapseTo-Definitions CTRL + M, O
Edit.ToggleAllOutlining CTRL + M, L
Edit.ToggleOutliningExpansion CTRL + M, M
Edit.StopOutlining CTRL + M, P
Edit.CommentSelection CTRL + K, C or CTRL + E, C
Edit.UncommentSelection CTRL + K, U or CTRL + E, U
Edit.FormatDocument CTRL + K, D or CTRL + E, D
Edit.FormatSelection CTRL + K, F or CTRL + E, F
Edit.InsertSnippet CTRL + K, X
Edit.SurroundWith CTRL + K, S
Edit.InvokeSnippetFromShortcut TAB
Edit.CycleClipboardRing CTRL + SHIFT + V
Edit.Replace CTRL + H
Edit.ReplaceInFiles CTRL + SHIFT + H
View.ShowSmartTag CTRL + . Or SHIFT + ALT + F10
File
File.NewProject CTRL + SHIFT + N
File.OpenProject CTRL + SHIFT + O
Project.AddClass SHIFT + ALT + C
Project.AddExistingItem SHIFT + ALT + A
Project.AddNewItem CTRL + SHIFT + A
Window.ShowEzMDIFileList CTRL + ALT + DOWN ARROW
Edit.OpenFile CTRL + O
Intellisense
Edit.CompleteWord CTRL + SPACE or CTRL + K, W
Edit.ListMembers CTRL + J or CTRL + K, L
Edit.QuickInfo CTRL + K, I
Edit.ParameterInfo CTRL + SHIFT + SPACE or CTRL K, P
Make Completion List Transparent CTRL
Navigation
Edit.FindAllReferences SHIFT + F12 or CTRL + K, R
Edit.GoToBrace CTRL + ]
Edit.GoToDefinition F12
Edit.GoToNextLocation F8
Edit.IncrementalSearch CTRL + I
View.ClassViewGo-ToSearch, Combo CTRL + K, CTRL + V
View.ForwardBrowseContext CTRL + SHIFT + 7
View.PopBrowseContext CTRL + SHIFT + 8
View.NavigateBackward CTRL + MINUS SIGN (-)
View.NavigateForward CTRL + SHIFT + MINUS SIGN (-)
Edit.FindInFiles CTRL + SHIFT + F
Edit.FindSymbol ALT + F12
View.ViewCode F7
View.ViewDesigner SHIFT + F7
View.ViewMarkup SHIFT + F7
Window.MoveToNavigationBar CTRL + F2
Edit.Find CTRL + F
Edit.GoTo CTRL + G
Edit.GoToFindCombo CTRL + /
Window
View.ClassView CTRL + W, C
View.CodeDefinitionWindow CTRL + W, D
View.Command-Window CTRL + W, A
View.ErrorList CTRL + W, E
View.ObjectBrowser CTRL + W, J
View.Output CTRL + W, O
View.PropertiesWindow CTRL + W, P
View.SolutionExplorer CTRL + W, S
View.TaskList CTRL + W, T
View.Toolbox CTRL + W, X
View.ServerExplorer CTRL + W, L
Window.CloseToolWindow SHIFT + ESC
Data.ShowDataSources SHIFT + ALT + D
Window.CloseDocument, Window CTRL + F4
Window.NextDocument, WindowNav CTRL + TAB
Refactor
Refactor.EncapsulateField CTRL + R, E
Refactor.ExtractInterface CTRL + R, I
Refactor.ExtractMethod CTRL + R, M
Refactor.PromoteLocalVariabletoParameter CTRL + R, P
Refactor.RemoveParameters CTRL + R, V
Refactor.Rename CTRL + R, R or F2
Refactor.ReorderParameters CTRL + R, O
Debugging
Debug.Autos CTRL + D, A
Debug.CallStack CTRL + D, C
Debug.Immediate CTRL + D, I
Debug.Locals CTRL + D, L
Debug.QuickWatch CTRL + D, Q
Debug.Start F5
Debug.StartWithoutDebugging CTRL + F5
Debug.StepInto F11
Debug.StepOut SHIFT + F11
Debug.StepOver F10
Debug.StopDebugging SHIFT + F5
Debug.ToggleBreakpoint F9
Debug.Watch CTRL + D, W
Debug.EnableBreakpoint CTRL + F9
Make Datatip Transparent [CTRL]
Build
Build.BuildSolution F6 or CTRL + SHIFT + B
Build.BuildSelection SHIFT + F6

Thursday, June 19, 2008

Setting or reordering the Tab Order in Visual Studio 2008 (Tip)

Within Visual Studio 2008 (while a form or user control is opened in the designer mode) select the Tab Order button on the layout toolbar as shown in the image.

This will add a number withing a small rectangle to each control in the form. Start clicking on each number and it will start reordering the tabs starting with zero. When done, hit Esc.