frnds,
I have a c# window application,inside there 3 projects which linked to each other?
Among 3 ,2 project are referenced project for the 3rd project.I even add reference 2 projects dll in 3rd project,as a result it shows me all properties of reference project inside my 3rd project perfectly,but i have 1 problem, i cant access there event delegates from the reference project into 3rd project?If u want i can give the code.Plss help, how can i access event delegates in another project ? i add use the namespace of the referenced project in the 3rd project.?
All 3 project are parts of 1 whole project..?
If u have any doubt let me knw,i will tell ,but i need the solution?Waiting for your positive reply.
Loading
r mPosted Nov 3, 2011, 1:09 AM
{
capture.FrameEvent2 += new Capture.HeFrame(CaptureDone);
capture.GrapImg();
}
error1 - 'DirectX.Capture.Capture' does not contain a definition for 'FrameEvent2' and no extension method 'FrameEvent2' accepting a first argument of type 'DirectX.Capture.Capture' could be found (are you missing a using directive or an assembly reference?)
error2-The type name 'HeFrame' does not exist in the type 'DirectX.Capture.Capture'
error 3- 'DirectX.Capture.Capture' does not contain a definition for 'GrapImg' and no extension method 'GrapImg' accepting a first argument of type 'DirectX.Capture.Capture' could be found (are you missing a using directive or an assembly reference?)
r mPosted Nov 3, 2011, 1:07 AM
r mPosted Nov 3, 2011, 1:03 AM
Javeed M ShaikhPosted Nov 2, 2011, 9:16 AM
In project 1 or 2:
public delegate void MyDelegate(string delegatestatus);
public void somework(string p, MyDelegate mydelegatecallback)
{
callback("mystatus");
}
In project 3:
public void MyProjectcall(string delegatestatus)
{
// do your work here.
}
And when you call the method:
ProjectB.somework("parametervalue", MyProjectcall);