What I use is a catfish skinner. It is like a long cutting board with a spring loaded clamp on one end. Just stick their head under the clamp and measure away. If they flop around too much, I just snap the clamp on their heads a few times. Calms 'em down right away...
Ok, so I made that up... What I do is when they are near the glass I put a finger at their tail and then head. I usually have a ruler by the tanks. To get good measurements, when a fish puts its nose against a side, I'll mark the point where the tail is and then take a measurement.
Oh, one other thing. When using your finger to mark a point, use a point on the outside of your finger. My fingers are right at 3/4" wide and using the center of my finger enters way too much error.