Questo e' un esempio molto bello, anche se e' in VB6 ...

http://www.freevbcode.com/ShowCode.asp?ID=2796