Overlay a label on an axwindowsmediaplayer control

2019-09-01 18:40发布

As the title suggests, I'd like to overlay a label on an axwindowsmediaplayer control while in fullscreen mode.

Has anyone any idea how to do it?

Thanks,

Joe

2条回答
三岁会撩人
2楼-- · 2019-09-01 18:56

I did my by...

  1. Creating 2 forms.1 with the media player set to what ever size needed
  2. The second form with...

    formborderstyle = none
    form2.left = form1.left + form1.mediaplayer.left 
    form2.top = form1.top +  form1.mediaplayer.top 
    
  3. Lower the opacity to 70 or if you want it in code..

    form2.opacity=0.7 
    
  4. Put your text or anything in the second form .

The final effect is a cool shade like effect with text in it with media playing in the background.

查看更多
做自己的国王
3楼-- · 2019-09-01 19:08

You may be able to use the windowlessVideo property. It mentions this exact use case in the documentation.

By default, an embedded Windows Media Player control renders video in its own window within the client area. When windowlessVideo is set to true, the Windows Media Player object renders video directly in the client area, so you can apply special effects or layer the video with text.

查看更多
登录 后发表回答