I been trying to write a program to access a COM Component
for a while now, with out much success so far. The
following is part of the code of my program, and this is
the message I get, can anyone see at a glance what I might
be missing.
Any advice would be appreciated.
Method 'USB.Form1.button5_Click(object, System.EventArgs)'
does not match delegate 'void
BDaq._IBBDaqEnumEvents_OnChangeEventHandler()'
namespace USB
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
//Declare an object variable to hold the device collection.
public BDaq.BBDaqEnum Connected;
//Declare an object variable to hold a device.
public BDaq.BBDaqDevice Device1;
//public BDaq.BBDaqDevice Device2; // for a second module
//More code
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
Connected += new
BDaq._IBBDaqEnumEvents_OnChangeEventHandler(this.b utton5_Click);
//
// TODO: Add any constructor code after
InitializeComponent call
//
}
private void button5_Click(object sender, System.EventArgs e)
{
//an instance
BDaq.BBDaqEnum Connected = new BDaq.BBDaqEnum();
Device1 = Connected.Devices("DAQ1");
Device1.Open();
//more code
}
}
}