How can I do this in VB6.0...
There's a default Caption in Textbox when it is empty, let say "Enter Name Here". but when the user fills in, the Caption will be replaced...
The Windows API has had cue banners (or prompt text) built in since Windows XP. It's not directly exposed by VB 6, but that doesn't stop you from getting at it by making a few API calls.
There are several advantages of going this route, versus implementing your own custom style. For one thing, it's already available for free, meaning you have to do very little work to use it. Second, it's already been fully tested and professionally polished. Third, it will automatically get upgrades whenever the next version of Windows comes out.
All the code you need is available here: SendMessage: Use Cue Banners to Prompt Users
As the page explains, you need to make sure that you've included a manifest with your EXE so that you can take advantage of the Windows XP themes and features. The only real tricky part about the code is that you need to make sure you pass a Unicode string.
The final effect looks something like this:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With