my code:
private AxWMPLib.AxWindowsMediaPlayer axWindowsMediaPlayer1;
this.axWindowsMediaPlayer1
= new AxWMPLib.AxWindowsMediaPlayer();
((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).BeginInit();
this.SuspendLayout();
//
//
axWindowsMediaPlayer1
//
axWindowsMediaPlayer1.Dock = DockStyle.Fill;
this.axWindowsMediaPlayer1.Enabled = true;
this.axWindowsMediaPlayer1.Location = new System.Drawing.Point(112, 88);
this.axWindowsMediaPlayer1.Name = "axWindowsMediaPlayer1";
this.axWindowsMediaPlayer1.OcxState =
((System.Windows.Forms.AxHost.State)(Resources.ResourceManager.GetObject("axWindowsMediaPlayer1.OcxState")));
//this.axWindowsMediaPlayer1.Size = new System.Drawing.Size(384, 248);
this.axWindowsMediaPlayer1.TabIndex = 0;
axWindowsMediaPlayer1.URL = url; //here url contain file location
axWindowsMediaPlayer1.Ctlcontrols.play();
when i
run this program it show me error that getobject method is not a part
of resources.resourcemanager namespace
Loading

Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 11, 2010, 1:13 AM EST
try to create the object of ResourceManager
please mark as answer if it helps.
tarun kumar7 reputationPosted Mar 11, 2010, 1:43 AM EST
this.axWindowMediaPlayer1 is not a type
so i replaced it with axwmplib.AxWindoMediaPlayer.
now i am getting run time exception that said.
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AxWMPLib.AxWindowsMediaPlayer.resources" was correctly embedded or linked into assembly "AxInterop.WMPLib" at compile time, or that all the satellite assemblies required are loadable and fully signed."
now my code is:
this.axWindowsMediaPlayer1 = new AxWMPLib.AxWindowsMediaPlayer();
((System.ComponentModel.ISupportInitialize)(this.axWindowsMediaPlayer1)).BeginInit();
this.SuspendLayout();
//
// axWindowsMediaPlayer1
//
this.axWindowsMediaPlayer1.Dock = DockStyle.Fill;
this.axWindowsMediaPlayer1.Enabled = true;
this.axWindowsMediaPlayer1.Location = new System.Drawing.Point(112, 88);
this.axWindowsMediaPlayer1.Name = "axWindowsMediaPlayer1";
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AxWMPLib.AxWindowsMediaPlayer));
this.axWindowsMediaPlayer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWindowsMediaPlayer1.OcxState")));
//this.axWindowsMediaPlayer1.Size = new System.Drawing.Size(384, 248);
this.axWindowsMediaPlayer1.TabIndex = 0;
axWindowsMediaPlayer1.URL = url;
axWindowsMediaPlayer1.Ctlcontrols.play();