Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there an easy way to place a transparent picture box over a playing video?

At this point I would rather do it on the same form. What I am trying to do
is display the video, and place a picture box frame over the video.

It must be possible but after a day of trying I am a little stuck? Even a
link on how to do this would be greatly appreciated.
Posted

1 solution

A very short answer: as GDI and DirectX (used to show video) don't live well together, this can be considered to be a too difficult problem to bother. You would need to use DirectX overlay with System.Windows.Forms. See, for example:
http://www.unknowncheats.me/forum/c/62019-c-non-hooked-external-directx-overlay.html[^],
http://gregs-blog.com/2008/02/26/managed-directx-c-graphics-tutorial-1-getting-started/[^].

What to do? My advice is: don't get there, instead, switch to WPF, which is itself based on DirectX.

Everything in WPF can be made semi-transparent, everything can be overlaid over everything, including video, without any special effort. I tested it; it's very easy.

—SA
 
Share this answer
 
Comments
Dr David Johnson PhD 28-Mar-13 0:40am    
My bad, I should have told you I need this to work using Windows Media Player,

My fault. However i did look at the link you sent and using Direct X that is a very good way of solving the problem.

My entire application depends on the media player and at this point changing to direct X would be a nightmare and require starting the whole project over.

BUT THANK YOU A LOT, I copied the information and saved the file to use on another project!
Sergey Alexandrovich Kryukov 28-Mar-13 0:46am    
Yes, yes, in WPF it will also work with MediaPlayer, don't worry.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900