2
Answers

How to initialize ActiveX Object In c#.net

Ask a question
tarun kumar

tarun kumar

14y
11.3k
1
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
               



Answers (2)
Next Recommended Forum