Category Archives: tools

Display battery status using a notify icon in C#

The example Display battery status in a friendly way in C# shows how to draw an image of a battery to show battery status. This example displays a battery image and the battery’s textual status in a notify icon. In … Continue reading

Posted in drawing, graphics, image processing, system, tools | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Compress JPG files in a directory in C#

I wrote this example to help produce reduced-size versions of some of the thousands of pictures I’ve collected over the years. Unfortunately pictures you take with a modern camera or phone tend to be enormous. Fortunately most of my relatives … Continue reading

Posted in algorithms, files, graphics, image processing, tools | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Easily reset file access and write times in C#

You can use this handy utility to reset the last access and last write times for any files that are dragged onto its executable. (I needed it because I had some files that were created while the system’s clock was … Continue reading

Posted in files, tools | Tagged , , , , , , , , , , , | Leave a comment

List Dropbox directories and files in C#

Dropbox is a file sharing service. The free Basic version lets you easily share up to 2 GB of files across the internet. The $9.99/month Pro version gives you up to 1 TB and the $15.00/month Business version gives you … Continue reading

Posted in directories, files, system, tools | Tagged , , , , , , , , , , , , , , | Leave a comment

Obscure parts of a picture for privacy in C#

This example lets you obscure parts of a picture to hide sensitive information such as names, email addresses, phone numbers, and photographs. It provides three obscuring styles: Pixelated (the area is replaced with blocks of color), Fuzzy (the area is … Continue reading

Posted in algorithms, files, GDI+, graphics, image processing, tools | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Register a program for a particular system in C#

This example demonstrates a fairly simple technique that you can use to register a program for a particular system. A determined hacker could circumvent it, but for most programs it won’t be worth the effort. The idea is simple. When … Continue reading

Posted in cryptography, programs, system, tools | Tagged , , , , , , , , , , , , | 2 Comments

Find, open, and replace text in files in C#

The example Find files and replace text in them in C# shows how you can find and replace text in files. This example modifies that one to let you open the files you find by double clicking on them in … Continue reading

Posted in directories, files, tools | Tagged , , , , , , , , , , , , , | Leave a comment

Find files and replace text in them in C#

This program lets you recursively find files in a directory hierarchy that match one or more patterns. You can then replace text in those files with new text. Both the Find and Find & Replace buttons call the SearchForFiles method. … Continue reading

Posted in directories, files, tools | Tagged , , , , , , , , , , , | 1 Comment

Make a notepad application that uses encryption in C#

The example Make a password manager in C# shows how you can use encryption to manage passwords safely. This example uses a much simpler approach, although it provides fewer features. This program lets you save information in a RichTextBox into … Continue reading

Posted in algorithms, cryptography, mathematics, tools | Tagged , , , , , , , , , , , , , , | Leave a comment

Merge the contents of one directory into another in C#

Once upon a time, if you used Windows Explorer to move a file from one directory to another and the destination directory already contained a file with that name, you had the option of keeping both versions of the file. … Continue reading

Posted in directories, files, system, tools | Leave a comment