devxlogo

Tip Bank

Getting a pixel color

The Point method returns the color value of a given pixel, but is rather slow because it has to convert its argument from twips (or whatever ScaleMode is currently active)

Setting a pixel color

The PSet method is much slower than it should actually be, and in most cases you will find it convenient to substitute it with direct calls to the SetPixel API

Counting characters in a file

Ever needed to count how many characters of a given type are in a file? For instance, how many alphabetical characters, or digits, or spaces? You might read each line