Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8951729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:43:52+00:00 2026-06-15T13:43:52+00:00

need help on an application that draws basic shapes over video even when it

  • 0

need help on an application that draws basic shapes over video even when it plays. I am using AXWindowsMediaPlayer control for playing video and also put a custom Panel to draw shapes over player control. Custom panel is transparent.
can draw smoothly while video is not playing. But when it plays every thing goes wrong. the drawing over the video get erased. How i can overcome the issue ?
Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:43:53+00:00Added an answer on June 15, 2026 at 1:43 pm

    i have found how to do this.
    here is one way in WPF using Canvas

    private void buttonPlayVideo_Click(object sender, RoutedEventArgs e)
    {
        Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
        dlg.Filter = "All Files|*.*";
        Nullable<bool> result = dlg.ShowDialog();
        if (result == true) {
            MediaPlayer mp = new MediaPlayer();
            mp.Open(new Uri(filename));
            VideoDrawing vd = new VideoDrawing();
            vd.Player = mp;
            vd.Rect = new Rect(0, 0, 960, 540);
            DrawingBrush db = new DrawingBrush(vd);
            canvas.Background = db;
            mp.Play();
        }
    }
    

    then create mouse events for Canvas and draw with it

        Point startPoint, endPoint;
        private void canvas_MouseDown(object sender, MouseButtonEventArgs e)
        {
            startPoint = e.GetPosition(canvas);
        }
        private void canvas_MouseUp(object sender, MouseButtonEventArgs e)
        {
            endPoint = e.GetPosition(canvas);
    
            Line myLine = new Line();
            myLine.Stroke = System.Windows.Media.Brushes.LightSteelBlue;
            myLine.X1 = startPoint.X;
            myLine.Y1 = startPoint.Y;
            myLine.X2 = endPoint.X;
            myLine.Y2 = endPoint.Y;
            myLine.HorizontalAlignment = HorizontalAlignment.Left;
            myLine.VerticalAlignment = VerticalAlignment.Center;
            myLine.StrokeThickness = 2;
            canvas.Children.Add(myLine);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help understanding how to manage the API for an iPhone application that
I am in need of urgent help. I have an application that was working
I have a hybrid application that I need to update a WPF control whenever
Our company is building a Winforms application that needs a map control to help
I just need help. Basically I am creating a windows appllication that sends bulk
I need help in a simple application based on Vaadin. I need to have
i need help with logging Zend Framewrok application ( version 1.11 ), every request..
I need help on encryption/decryption on Android application. I explain the situation. I'm actually
I need help on how to keep in-app-purchase items in my application downloading when
I Really need help in this ... I'm building an application where I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.