One clever approach I have seen in the past takes advantage of human's persistance of vision by display only a portion of the image at a time.
As a simple example, imagine that instead of rendering the password 'p455w0rd' in a textbox, you had a special text box that renders three different frames very quickly:
p ? ? 5 ? ? r ?
? 4 ? ? w ? ? d
? ? 5 ? ? 0 ? ?
Any screenshot would only capture a portion (1/3) of the data and would require that the capturer take many screenshots, select three that encompass all of the information and then combine them in an image editor to recover the data.
A better solution would use more frames (though flicker will increase as the number of frames increases) or finer granularity (pixels, say, instead of characters).
Remember, though, that this solution just makes it harder, not impossible to store the data. You would be hard pressed to stop the user whipping out a pen or camera. Unless this is for some government or call-centre application that is attempting to protect customer data, I would seriously consider not adding such a feature.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…