Nah, unfortunately that didnt work hkdani. But thanks for the post
That's funny: it works on my vb6 program. Actually, that's the method that I learned from a Microsoft CD on VB6 programming fundamentals. I've been using that method for years. It's odd that it doesn't work for you.
What I like about the method that Microsoft recommends is it's simplicity. That's why they made Visual Basic, because they knew that programs could be written faster and programmers could be more productive, if they were provided a simple way to perform a task such as the task you describe.
From what I've read and studied from the established authors and programmers, they always recommend the KISS method: Keep it Simple Stupid.
Yes, it's true that you can use API's. And it looks quite impressive. But in the end, in the real world it's all about achieving a desired end within a certain time frame.
If you can't achieve that end with the tools that VB6 provides, then VB6 has the flexibility of being able to call the Windows APIs from the Platform Software Developer Kit (PSDK). But as a general rule, use the tools that VB6 provides and only venture into APIs if VB6 doesn't provide the means to accomplish your end.
When it comes right down to where the rubber meets the road the end user will never see your code. He only sees your program. The programmer should not try to impress someone with his knowledge of Windows APIs, the end user probably doesn't have a clue as to what an API is.
Knowledge tends to puff people up. But a truly great programmer uses his knowledge to meet the needs of his client not to enhance his ego.