Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. how to make transparent control above video?

how to make transparent control above video?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpgame-devhelpdotnetgraphics
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    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!

    B A 2 Replies Last reply
    0
    • L Lost User

      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!

      B Offline
      B Offline
      Bob X
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • L Lost User

        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!

        A Offline
        A Offline
        Andrew Lygin
        wrote on last edited by
        #3

        You can use a transparent (TransparencyKey = BackColor) form above your panel.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups