How could one change the opacity of a TWinControl based control? And why didn’t they add this capability to TControl/TWinControl level (why only TForm)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Controlling the opacity of a window is offered by a feature called layered windows. You can read more about the feature on MSDN. The feature is only available for top-level windows. As far as I can tell, Desktop Window Manager (Vista’s “glass” effect) is also only available for top-level windows.
Alternatives available for child windows are to use window regions to mark certain areas of a window as completely transparent, or to use bitmap alpha blending to draw the whole control yourself.