Invoke does not exist in the current context

  • Thread starter Thread starter The.Relinator
  • Start date Start date
T

The.Relinator

Hello, I seem to be getting the following error in one class, but not
in a form. The name 'Invoke' does not exist in the current context.

The code I am trying to execute is:

Invoke(d, new object[] { text });

all my using statements are:

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;

Any help regarding this issue would be greatly appreciated, thankyou
 
Unless your class implements ISynchronizeInvoke (which all classes
deriving from Control do), you won't have the Invoke method implemented.

You need to make the call on a class that implements this interface
(anything derived from Control will do).

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top