![]() |
P6StrLen |
Name: |
P6StrLen |
| Synopsis: | Calculate lengths of strings. |
Version: |
2.00 |
| Author: | David A. Gray, MBA, of Simple Soft Services, Inc., d/b/a WizardWrx |
Copyright: |
© 1998, 2000, 2003, 2004, 2006 WizardWrx. All rights reserved world wide. |
Syntax: |
The program can be run from a shortcut and operates interactively, displaying a dialog box with a text box into which you enter or paste the string for which you wish to calculate a length. Buttons on the dialog box enable you to easily paste strings into the text box, calculate the length of the string in the text box, and cause the calculated length or the text itself to be placed on the Windoww Clipboard. |
When you launch the program from a command prompt, a shortcut, or the Windows Explorer, after a few seconds, the dialog box shown in Figure 1, below, displays.

Figure 1 - String length calculator, ready to use.
If the Windows Clipboard contains text, the opening screen shown in Figure 2, below appears. Note that the Paste button is enabled.
<
Figure 2 - String length calculator, ready to accept text from the Windows Clipboard.
There are four ways to get strings into the calculator.
Since the program checks the state of the Clipboard ten times a second, the state of the Paste button changes, depending on whether there is text in it.
Figure 3, below, shows the dialog box with the string "You are the apple of my eye." pasted into the text box. The recessed text box at the bottom confirms that text was pasted from the Clipboard. We call this read only text box the status line.
Figure 3 - Program with string pasted into text box.
When you press the Copy Length to Clipboard button or its accelerator, ALT-C, the length of the string is placed on the Windows Clipboard. This action is confirmed by a notation in the status line, as shown in Figure 4, below.

Figure 4 - Status bar reports that length of text has been converted to text and placed on the Clipboard.
You may paste the string length into your favorite programmer's editor, Microsoft Word, or any other program that accepts text from the Windows Clipboard. We suggest that you do so right away, before you forget it's there and overwwrite it with your next clipboard operation.
When you press the Copy Text to Clipboard button or its accelerator, ALT-T, the string in the input text box is copied onto the Windows Clipboard. This action is confirmed by a notation in the status line, as shown in Figure 5, below.

Figure 5 - Status bar reports that text in the input box has been copied onto the Clipboard.
To calculate the length of a different string, enter new text, using any of the methods described above. When you type text directly into the program, the length is calcaulated as you enter each character.
To quit the program, click the Quit button, press its accelerator, ALT-Q, or click the X icon in the upper right corner.
P6StrLen requires version 2.0.50727 or later of the Microsoft .NET Framework, which is a free downlload, available here. The download is about 22 megabytes, and requires about 60 megabytes to install.
By installing the Microsoft .NET Framework, you will be able to run thousands of new applications that use the framework to enable programmers to deliver robust, high quality software that is easier to install and maintain. In addition, programs built on the Microsoft .NET Framework are frequently smaller than similar programs built with tools such as Visual Basic, and even Visual C++, because they require so little custom code, and are less likely to depend on external DLLs, other than those that come with the framework.
If your machine does not yet have the Microsoft .NET Framework, when you start P6StrLen, your computer will display the prompt shown in Figure 6, below.
Figure 6 - Error message displayed when you attempt to run P6StrLen on a machine that does not have the required version of the Microsoft .NET Framework
If you see this message, download and install the Microsoft .NET Framework from either of the following two locations.
You can install P6StrLen.exe anywhere, even in your general utility program directory,
The table below lists all the files that come in this package.
File Name |
Purpose and Other Notes |
P6StrLen.exe |
This is the main program. This file nay go anywhere, so long as the support DLL goes in the same directory. |
P6StrLen_200.html |
This document, formatted for viewing in any Web browser that supports tables. |
P6Consulting.CSS |
Cascading Style Sheet to accompany |
/images |
Folder containing images displayed in |
You may install and run P6StrLen.exe anywhere.
The table below gives a brief development history of this program.
Date |
By Whom |
Version |
Remarks |
12/29/1998 |
DAG |
1.00 |
Initial release (experimental – in house use only). |
07/14/2001 |
DAG |
1.10 |
Change to handle WM-CLOSE message gracefully (still experimental – in house use only). |
06/22/2003 |
DAG |
1.20 |
Initial Public Release. |
10/11/2004 |
DAG |
1.30 |
Automatically update length when the Paste button is clicked or selected with its accelerator key. |
02/11/2006 |
DAG |
2.00 |
This is a complete rewrite, in the C# programming language, and includes major improvements in performance, features, and intetgration with the Windows Clipboard. |
This software is freeware. However, in the unlikely event that you need support, you may make your request by email. Please use this form to contact us. Your inquiry will be handled on a best efforts basis, and any information you send us about your specific situation will be treated as confidential. We do, however, reserve the right to incorporate any ideas we get from our correspondence with you into future versions of P6StrLen or other software either for internal use or for sale. Should we do so, we shall give full credit to its source in the accompanying documentation.
Download your free copy here.
The MD5 digest of this file is 966e21e8d1ad1427c546678350a14bc0. You
can use MD5WIN to verify the MD5 digest of this
and other files.
WizardWrx Home page www.wizardwrx.com.
| P6StrLen Home Page | Other Free Stuff |