简体   繁体   中英

How to add 64bit VLC ActiveX control to c# winform

Can anyone explain how to embed the 64bit VLC activeX control in ac# .net winforms app. For the 32bit version, adding the control from the designer adds the references to AxAxVLC and AXVLC. For the 64bit, I can only figure out how to add the AXVLC reference manually, which doesn't seem to have winforms control properties and methods like vlc.CreateControl() or vlc.Location.

Here is the code for 32bit embed:

 vlc1 = new AxAXVLC.AxVLCPlugin2();
            vlc1.CreateControl();
            ((System.ComponentModel.ISupportInitialize)(vlc1)).BeginInit();
            vlc1.Location = new Point(10, 10);
            vlc1.Name = "vlc1";
            vlc1.OcxState = ((System.Windows.Forms.AxHost.State)   (resources.GetObject("vlc.OcxState")));
            vlc1.Size = new System.Drawing.Size(240, 180);
            vlc1.TabIndex = 0;
            this.Controls.Add(vlc1);

Set Platform Target to x86 (32 bit) for the project and use the VLC plugin in the normal way. The app will run on 64bit OS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM