You don't say what version of Delphi you're using, what version of Windows you're using, or what version of IE you have installed, which is what TWebBrowser wraps. (As a general note because you're a new user here, you really need to provide more information when asking a question like this. Pretend it was a user of your software reporting this bug - you'd throw your hands up and say "Bah, not reproduced. Why can't they tell me what they're doing?" Same for us when reading your question.)
But, that said, the fact it vanishes when you press the Alt key is a hint. Windows has an option to hide accelerator keys (the underline mark such as the underlined F on a File menu) until the user presses the Alt key. When it does, controls are sent a WM_DRAWITEM message indicating something's changed. See also WM_CHANGEUISTATE.
There have been bugs in past versions of Delphi handling this (see this example bug) including a bug where controls completely vanished when the Alt key was pressed. TWebBrowser isn't listed in that QC item, but it's quite possible it's affected.
So my guess is:
- You're using Delphi 7 or earlier
- You're using XP or above, and running
themed
- You're encountering this bug,
which is affecting either the
TWebBrowser control or a parent of it
Solution: upgrade Delphi or apply the fix listed in the QC item.