c# - Containing type does not implement interface IMessageFilter -


i'm still trying find out happening error:

ocr.test.imessagefilter.prefiltermessage(ref system.windows.forms.message): containing type not implement interface system.windows.forms.imessagefilter

here codes:

bool imessagefilter.prefiltermessage(ref message m) // error line {     twaincommand cmd = tw.passmessage(ref m);     if (cmd == twaincommand.not)         return false;      switch (cmd)     {         case twaincommand.closerequest:         {             endingscan();             tw.closesrc();             break;         }         case twaincommand.closeok:         {             endingscan();             tw.closesrc();             break;         }         case twaincommand.deviceevent:         {            break;         }         case twaincommand.transferready:         {             arraylist pics = tw.transferpictures();             endingscan();             tw.closesrc();             picnumber++;             (int = 0; < pics.count; i++)             {                 intptr img = (intptr)pics[i];                 picform newpic = new picform(img);                 newpic.mdiparent = this;                 int picnum = + 1;                 //newpic.text = "scanpass " + picnumber.tostring() + "_pic " + picnum.tostring();                 newpic.show();             }             break;         }     }      return true; } 

the class implement prefiltermessage method needs derive imessagefilter interface. missed it

public class foo: imessagefilter {    bool imessagefilter.prefiltermessage(ref message m)    {        // code    } } 

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -