Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi Everyone

I am trying to drawing lines on video .Here Iam Drawing directly on Desktop.But it not visible when theam change to Aero

Please help me

Thanks in Advance
Posted
Comments
Legor 27-Sep-12 6:10am    
Not clear you need to provide more details.
ravindervilasagar 27-Sep-12 6:25am    
I want to Draw Mouse positions on Running Video

please Help me.....
Ravi Bhavnani 27-Sep-12 12:57pm    
Not an easy task - see http://stackoverflow.com/questions/3752016/drawing-on-video-within-c-sharp for suggestions.
Sergey Alexandrovich Kryukov 27-Sep-12 13:39pm    
The major problem is that Video is, most likely, DirecX. The answer depends on what UI library do you use. This is very difficult in Forms (you would need to use DirectX API on lower level) and fairly simple in WPF.
--SA

1 solution

You can easily do it, but this is easy only if you use WPF. In simplest case, put video in some parent container, a panel. On top of it, put some line objects in the same panel.

It could be the object of the class System.Windows.Shapes.Line:
http://msdn.microsoft.com/en-us/library/system.windows.shapes.line.aspx[^].

If could be some other Shape:
http://msdn.microsoft.com/en-us/library/system.windows.shapes.shape.aspx[^].

Optionally, to allow you to freely manipulate coordinates and parameters of your shapes could be placing of video and shapes in System.Windows.Controls.Canvas:
http://msdn.microsoft.com/en-us/library/system.windows.controls.canvas.aspx[^].

For video, you would use the instance of System.Windows.Controls.MediaElement:
http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.aspx[^].

—SA
 
Share this answer
 

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