I want to create a control (derived from TCustomControl) that is invisible but reacts to normal events (I want to use it to show a hint when moving the mouse over a custom element). I thought overriding the paint method and leaving it empty would do the job but unfortunately a rectangle is drawn where the component is.
How can I make the control completely invisible?
You can inherit from
TGraphicControlinstead of fromTCustomControl, and leave the paint handler empty. Nothing will be drawn.If you need a windowed control, then you should make sure that it has no border and uses the parent background. See this question for info on how to do that. You may need to override
CreateParams()as well, to remove the border style bits.