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

  • SEARCH
  • Home
  • 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 8169195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:46:25+00:00 2026-06-06T20:46:25+00:00

I am trying to figure out how to close my application when the video

  • 0

I am trying to figure out how to close my application when the video that the form plays stops playing. Currently, the user clicks a button to bring up Form2. The control for the video is set to force the video full screen, and start playing from the beginning of the video. I am using axWindowsMediaPlayer to provide the video. I am also a complete neophyte when it comes to C#.

How would I get my application to close when the video stops playing?

  • 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-06T20:46:26+00:00Added an answer on June 6, 2026 at 8:46 pm

    You need to detect when the media has ended, here is a tutorial on: “Detect the End of Media – axWindowsMediaPlayer”. Then you need to call Close(); to close the form you are currently playing the media from.

    Example (snippets from msdn):

    // Subscribe to the Play State Change event
    player.PlayStateChange += 
      new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(player_PlayStateChange);
    

    Then you need the event handler that can look like this:

    private void player_PlayStateChange(object sender,
                                      AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
    {
        // 8 = Media Ended
        if(e.newState == 8) { Close(); }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to figure out why my recipient multiselect isn't validating on form submission. Should
Trying to figure out how to programmatically access the web pages in the application.
I am trying to figure out what changed within a project that now causes
I'm trying to figure out a way to make a Java application invisible to
I am currently trying to figure out a way to write a media file
I am trying to figure out why the first WCF call after client application
I'm having a problem that I've spent far too long trying to figure out.
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
Trying to figure out why my silverlight app suddenly just displays nothing (right click

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.