Stonkie
Well-known member
- Joined
- Sep 12, 2007
- Messages
- 279
- Programming Experience
- 1-3
I am doing an application which displays a popup preview near the mouse to show some information about the hovered item.
I made the form topmost and borderless, but it kept getting the focus when the preview appeared (preventing mouse wheel events, etc.). To prevent this, I set the form's enabled property to false. However, that sets the color of any text Label to a disabled gray.
I tried setting the Label's ForeColor property back to Black (or the normal system color), and it sets the property, but it has no effect. I also tried setting the label's enabled state to true independently from the owning form, but that has no effect (doesn't even set the property).
I would rather avoid creating a custom control to draw simple text (I actually have one for gradient background effect and stuff) as this preview must load as fast as possible (it already has to access the database and decrypt some images!).
Is there some way to tell the Label not to draw that way? Or is there a better way to make popup previews?
I made the form topmost and borderless, but it kept getting the focus when the preview appeared (preventing mouse wheel events, etc.). To prevent this, I set the form's enabled property to false. However, that sets the color of any text Label to a disabled gray.
I tried setting the Label's ForeColor property back to Black (or the normal system color), and it sets the property, but it has no effect. I also tried setting the label's enabled state to true independently from the owning form, but that has no effect (doesn't even set the property).
I would rather avoid creating a custom control to draw simple text (I actually have one for gradient background effect and stuff) as this preview must load as fast as possible (it already has to access the database and decrypt some images!).
Is there some way to tell the Label not to draw that way? Or is there a better way to make popup previews?