PDA

View Full Version : MVSmartControlClass Events



VikingSooner
March 9, 2008, 20:00:34
Is there a way to get events back from the MVSmartControlClass? I am using the MVSmartControlClass in a windows service so there is not a user interface.

- Matt

Marc Cymontkowski
March 10, 2008, 08:16:05
Hi Matt,

What kind of events are you looking for, do you need Video Window events? You have to enable them on the IMVSVVideoWindow interface (EnableVideoWindowEvents).


Best Regards,

Marc

VikingSooner
March 10, 2008, 13:21:48
I am trying to receive events back from the MV Motion Detection control. It works fine when I use the smart control within a form but when I use it without a GUI and using the MVSmartControlClass I do not get any filter events back.
Here is how I am setting it up in C#:

MVSmartControlClass graph = new MVSmartControlClass();
graph.FilterEvent += new _IMVSmartControlEvents_FilterEventEventHandler(thi s.FilterEvent);
graph.IMVSCFilterEvents_Enable("MV Motion Detection");

Marc Cymontkowski
March 10, 2008, 13:27:00
Hi,

Do you load the graph configuration before you enable the filter event?


Regards,

Marc

VikingSooner
March 10, 2008, 13:32:54
Yes. The graph loads up correctly and I can access the various interfaces of the filters. I just don't get any events back from the filters event though I am calling enable filter events on them.

- Matt

Marc Cymontkowski
March 10, 2008, 13:56:26
Hi,

another question, just saw this syntax:

graph.IMVSCFilterEvents_Enable("MV Motion Detection");

Does this work under C#, do you get a cookie back? Why don't you do this the standard way, requesting the interface from the Smart Control and calling the interface method (as you can see in our samples)?


Regards,

Marc

VikingSooner
March 10, 2008, 14:03:56
Yes. I get a cookie back actually.

The reason I can't use the SmartControl as you do in your examples is because I do not have a visual interface. I am running the .mvp inside a windows service. Everything has worked perfectly using the MVSmartControlClass. The only issue I have run into is getting filter events back.

If you search for "MVSmartControlClass"on your forums there is another post of a guy that had the same problem. Were you ever able to come up with a solution for him?

- Matt