主窗体程序: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp20 {…
解决办法是Form类中定义一个静态的ActiveX对象,在formload中将界面上的ActiveX对象赋值给新定义的对象,类中访问该静态对象即可. public static AxClientDriver_NTLib.AxClientDriverCtrl com = new AxClientDriver_NTLib.AxClientDriverCtrl(); private void Form1_Load(object sender, EventArgs e) { com = this.axC…