is it possible to adding a click method to a class in dll from another project?
I want to create a class (Class1) in a class library and build a dll from it.
I will use that class in a project with references the dll.
This is my class (Class1)
public class Class1
{
public ImageMap map = null;
public Class1(Form f)
{
map = new ImageMap();
map.RegionClick += f.RegionMap_Clicked;
}
}
and this is my form (Form1) in another project.
public partial class Form1 : Form
{
Class1 c = null;
public Form1()
{
InitializeComponent();
c = new Class1(this);
}
void RegionMap_Clicked(int index, string key)
{
MessageBox.Show(key);
}
}
This is my first time asking here. So, sorry if my english is bad.