Guarda questo esempio ...

http://www.vbforums.com/attachment.p...2&d=1047106270