Introduction The main purpose of this article is to show how to build your own Transparent Control in VB.NET by extending the control through inheritance . Also, the class might be used as a base class to build your own custom transparent controls such as PictureBox , Button , Panel , .....etc. Background Since the Windows Form Control is the only control that supports transparency through its Opacity property, I decided to utilize the same strategy to build a control that supports transparency. I saw so many articles talks about the transparency of the control, and I had studied most of the techniques which discuss the same issue and some of these techniques are listed below: To call InvokePaintBackground of the control’s parent and override the OnPaintBackground event. To draw image which supports transparency to avoid the issues due to double buffering and flickering? To override CreateParams property, set ExStyle value to support transparency and on OnPa
Comments
Post a Comment