Individual Key Counter

Visual Basic Projects No Comments »

I recently received a e-mail from a person asking if I knew of any program that could count how many times per day a certain key on the keyboard was pressed. In her case she wanted to know how many times per day she pressed the F9 key. I told her I didn't know of one off-hand but that I could make one in Visual Basic in about 15 minutes. And so I did, and here is the result. I call it "Key Counter" and I decided to release it publically in case anyone else wants it or can learn something from it.

As you can see from the screenshot below it's a very simple and small program. You simply tell it what key you want to watch (F9 is the default), then you minimize it and go about your work, then when you come back to it it will tell you how many times you pressed that key. There's also a "reset" button you can click to reset the count back to 0. This program will not "record" your keystrokes in any way, it will simply count them. You can download both the Visual Basic source code and the program below to see for yourself.

In the future I may make another program that counts all keystrokes made, not just those from an individual key if there's enough interest.

Download keycounter.zip (March 21, 2009)


Read the rest of this entry »

Form Size Finder

Visual Basic Projects No Comments »

Here's a simple Visual Basic program I wrote back in June 2005 called "Form Size Finder". I originally wrote this because I wanted to make a program that was the exact same size as another program I was using and I didn't know how to find the original program's width and height. This program is composed of a small form you drag around the screen and resize. As you do so it gives you detailed information about itself including it's width, height, and corner coordinates. To match another program's dimensions, you would simply open it up, overlay it on top of the program you want to know the size of, and then resize it to the other program's exact dimensions. Even if you don't use it for it's intended purpose, I think it still may be useful to Visual Basic beginners to see how "Always on top" works, how to drag a form around by clicking on it's body, how to use the StatusBar and SpinButton controls, and how to use the SetWindowPos, GetCursorPos, GetWindowRect, ReleaseCapture, and SendMessage Win32 API's.

Download form_size_finder.zip (June 06, 2005)


Read the rest of this entry »

VB Keyword Combiner

Adwords Tools, Visual Basic Projects No Comments »

As I was organizing some of my old code, here's an interesting program I came across that I wrote back in June of 2005 called "Keyword Combiner", which I wrote just one day after completing a similar program, Word Combination Maker. Instead of re-ordering words, this program allows you to add a series of words before and after a given word to make a list of new words. In the zip file below you'll find both the Visual Basic source code and the program itself. Feedback and comments are welcome. If you're looking for a web-based version of this, check out my Adwords Keyword Combiner. Enjoy!

Download keyword_combiner.zip (June 07, 2005)

Read the rest of this entry »

IsNumeric Alternative (VB Function)

Visual Basic Projects No Comments »

Here's an original idea I came up with as a replacement to the built-in VB IsNumeric function. It gives you complete control over what you consider a number to be. For example, let's say you pass the value $3,207.37 to isNumeric. Now normally this would return true, but what if you didn't want it to return true. What if you wanted it to count the comma and period as a number, but not the dollar sign (i.e. 3,207.37 is a number and $3,207.37 is not). Well normally you wouldn't be able to do anything about it, but with this function you are able to decide which individual characters you think are numeric and which characters you think are not numeric. This function allows you to pass as many characters as you want after the number specifying what you consider a number to be. For example, if you consider the comma (,) and the dollar sign ($) to be "a number", then you would say isNumeric2("333.33", ",$"). After you pass it the initial number (either in string or non-string form), you pass it all of the characters you consider to be numeric in one string, so if you consider the comma, dollar sign and percent sign to be numeric you would say: isNumeric2("$500.23%", ",$%"). And this function will return true (if the number is numeric) and false (if the number is not numeric). Feedback and comments are welcome.

Download is_numeric_alternative.zip (June 11, 2005)


Read the rest of this entry »

Word Combination Maker

Adwords Tools, Visual Basic Projects 4 Comments »

Here's the source code to a Visual Basic project I originally wrote on June 06, 2005 called "Word Combination Maker". This is somewhat similar to my Word Combiner program. This program has to do with string permutations (or rather the permutations of words). It takes a series of words and it can tell you all the different possible ways those words can be re-arranged. Here's an example, let's say I type "A B C". This is composed of 3 individual words (A, B, and C). This can be arranged 6 different ways: "ABC, ACB, BAC, BCA, CAB, CBA". Well that's easy to understand but what about for 4 words, or 5 words? There's a lot more combinations as the number of words grow (it grows exponentially in fact). It can get pretty complicated by hand, so that's why I wrote this program. It would probably be most useful for people advertising on PPC advertising programs like Google Adwords because it allows you to pick out certain keywords and phrases that you can bid on "exactly". All the different ways of combining a series of words can be found with this program. Feedback and comments are welcome.

Download word_combination_maker.zip (June 06, 2005)


Read the rest of this entry »

Entries RSS Comments RSS Log in