Results 1 to 5 of 5

Thread: [RESOLVED] Change media player to visible

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2016
    Posts
    55

    Resolved [RESOLVED] Change media player to visible

    I do not want the video to start until the end of the program!
    I have a media player in my form that is set to invisible, but plays in the background invisible.
    I would like it to be visible at the end of the program and play a video file.
    If it is visible at the start of the program, it plays the video file.
    I only want it to play at the end of the program.
    Last edited by wideminnow6970; Feb 16th, 2021 at 11:32 AM.

  2. #2
    Addicted Member
    Join Date
    Oct 2018
    Posts
    230

    Re: Change media player to visible

    show us your code. and maybe properties.
    Please dont forget to add good reputation if my advices were useful for you.

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2016
    Posts
    55

    Re: Change media player to visible

    I put the following control at the start of the program:
    AxWindowsMediaPlayer1.Ctlcontrols.stop()
    but the video stills plays.

    When the program is at the end, I put the following code:
    AxWindowsMediaPlayer2.Ctlcontrols.play()
    When the program is finished, it plays the video the way it is supposed to do.
    When the program starts it plays the video(which I do not want).
    How can I turn off the video at the start of the program?

  4. #4
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,294

    Re: Change media player to visible

    Usually when you load a file in the media player, it defaults to autostart playing that file.
    So, it seems like it would be simple to not load the file until you want to play it, i.e. at the end of your program.
    Perhaps I don't understand why you're loading the file when the player is not visible at the start.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2016
    Posts
    55

    Re: Change media player to visible

    I changed the AxWindowsMediaPlayer2.Ctlcontrols.play() to ME.AxWindowsMediaPlayer2.Ctlcontrols.play()
    Now it works the way that I wanted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width