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. axmediaplayer and e.newState [modified]

axmediaplayer and e.newState [modified]

Scheduled Pinned Locked Moved C#
comgraphicstestingbeta-testingquestion
2 Posts 1 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.
  • E Offline
    E Offline
    electriac
    wrote on last edited by
    #1

    I have used the following code in my media player for several years now and have incurred no problems. I recently updated to Mediaplayer 11 and this code is no longer recognized.

    private void player_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
    {

            if (e.newState == 8 || e.newState == 1)
            {
                //MessageBox.Show("-----------"); // for testing
                this.WMPlayer.Size = new System.Drawing.Size(325, 64);
    
            }
            if (e.newState == 8)
            {
                //MessageBox.Show("-----------"); // for testing
                timer3.Interval = 5000;
                timer3.Enabled = true; 
                // This timer plays the next selection
    
            }
        }
    

    Does anyone have an explanation and solution? Complete source code that works under Mediaplayer 10 is available from my web site: http://electriac.googlepages.com/wmplayer.exe[^]

    modified on Tuesday, August 19, 2008 4:57 PM

    E 1 Reply Last reply
    0
    • E electriac

      I have used the following code in my media player for several years now and have incurred no problems. I recently updated to Mediaplayer 11 and this code is no longer recognized.

      private void player_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
      {

              if (e.newState == 8 || e.newState == 1)
              {
                  //MessageBox.Show("-----------"); // for testing
                  this.WMPlayer.Size = new System.Drawing.Size(325, 64);
      
              }
              if (e.newState == 8)
              {
                  //MessageBox.Show("-----------"); // for testing
                  timer3.Interval = 5000;
                  timer3.Enabled = true; 
                  // This timer plays the next selection
      
              }
          }
      

      Does anyone have an explanation and solution? Complete source code that works under Mediaplayer 10 is available from my web site: http://electriac.googlepages.com/wmplayer.exe[^]

      modified on Tuesday, August 19, 2008 4:57 PM

      E Offline
      E Offline
      electriac
      wrote on last edited by
      #2

      I have uninstalled Mediaplayer 11 and reinstalled Mediaplayer 10 and all is well. So does this mean my program must use Mediaplayer 10!???

      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