How can be a Transparent panel control can be created
-
How can be a transparent panel control can be created. As I tried in many ways but it is applicable to window but not to the required control (panel), as well as I also have observed that Transparency will be applicable to windows forms but not to user control. Is it so, if yes why. Shashidhar
-
How can be a transparent panel control can be created. As I tried in many ways but it is applicable to window but not to the required control (panel), as well as I also have observed that Transparency will be applicable to windows forms but not to user control. Is it so, if yes why. Shashidhar
-
How can be a transparent panel control can be created. As I tried in many ways but it is applicable to window but not to the required control (panel), as well as I also have observed that Transparency will be applicable to windows forms but not to user control. Is it so, if yes why. Shashidhar
Try making a bitmap that is all one colour and setting it as the background image for your panel. Then add the following code to the form_Load event
Bitmap bitmap = (Bitmap)pnlBackground.BackgroundImage;
bitmap.MakeTransparent(bitmap.GetPixel(1, 1));
TransparencyKey = BackColor;You may also need to start the form minimized and then do
WindowState = FormWindowState.Normal;
I don't know why but sometimes this is the case. Cheers Kev