Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows media player problem

Windows media player problem

Scheduled Pinned Locked Moved C#
helpcsharpcomquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bunty20k
    wrote on last edited by
    #1

    my application is windows based (C#.net) i have two forms both containing a windows media player i go to first form(Form 1) and start a file in media player now if i go to second form and start a file in media player there also , the media player in form 1 should stop how will i achieve this?? i have tried all the methods but nothing have worked like Test ts = new Test(); [First Form] ts.axWindowsMediaPlayer1.Stop(); ts.axWindowsMediaPlayer1.settings.volume=0; ts.axWindowsMediaPlayer1.Dispose(); ts.axWindowsMediaPlayer1.currentPlaylist.clear(); ts.axWindowsMediaPlayer1.close();[Error-com object that has been seperated from its underlying RCW cannot be used] plzz help

    A 1 Reply Last reply
    0
    • B bunty20k

      my application is windows based (C#.net) i have two forms both containing a windows media player i go to first form(Form 1) and start a file in media player now if i go to second form and start a file in media player there also , the media player in form 1 should stop how will i achieve this?? i have tried all the methods but nothing have worked like Test ts = new Test(); [First Form] ts.axWindowsMediaPlayer1.Stop(); ts.axWindowsMediaPlayer1.settings.volume=0; ts.axWindowsMediaPlayer1.Dispose(); ts.axWindowsMediaPlayer1.currentPlaylist.clear(); ts.axWindowsMediaPlayer1.close();[Error-com object that has been seperated from its underlying RCW cannot be used] plzz help

      A Offline
      A Offline
      Atul Kharecha
      wrote on last edited by
      #2

      See when you create another object of form1 from form2, it doesn't mean you will get running instance. You need to get instance of same form previously loaded. So from the startup method, create two objects of form1 and form2 and use it in both form instead of creating new object and this will work.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups