The code in your first post is VB6 and is using the Windows API
The code in the second post looks like Vb.Net

So are you using VB6 or are you using one of the newer .Net VB versions?

as for...