how to make transparent control above video?
-
Hi all I'm writing a simple form which is a launcher of a game using C# with .net framework. What problem I met is, I need to place some transparent buttons in the form which contains a playing AVI video in the background, but the video in the transparent part of those buttons cannot be properly displayed. I used a panel to hold the AVI video (using Microsoft.DirectX.AudioVideoPlayback) and a PictureBox to hold the transparent image (PNG format). I did set the background of the PictureBox to transparent, but the color of the transparent part of the Image seems as same as the background color of the form. Can you help me about this? thanks!
-
Hi all I'm writing a simple form which is a launcher of a game using C# with .net framework. What problem I met is, I need to place some transparent buttons in the form which contains a playing AVI video in the background, but the video in the transparent part of those buttons cannot be properly displayed. I used a panel to hold the AVI video (using Microsoft.DirectX.AudioVideoPlayback) and a PictureBox to hold the transparent image (PNG format). I did set the background of the PictureBox to transparent, but the color of the transparent part of the Image seems as same as the background color of the form. Can you help me about this? thanks!
You might be able to work something out by using the backcolor and forecolor options for the controls and set the color to transparent. ex:
control1->backcolor = Color(0x00000000);
p.s. the code sample is in c++, although it should be close enough for you to work with it in c#, and the color call is in system.drawing.dll -
Hi all I'm writing a simple form which is a launcher of a game using C# with .net framework. What problem I met is, I need to place some transparent buttons in the form which contains a playing AVI video in the background, but the video in the transparent part of those buttons cannot be properly displayed. I used a panel to hold the AVI video (using Microsoft.DirectX.AudioVideoPlayback) and a PictureBox to hold the transparent image (PNG format). I did set the background of the PictureBox to transparent, but the color of the transparent part of the Image seems as same as the background color of the form. Can you help me about this? thanks!
You can use a transparent (TransparencyKey = BackColor) form above your panel.