CipherIS
asked on
C# Replace InvokeRequired
I am converting a form to a DLL. Below is a snippet of an example of code that I am dealing with. Is there a way to replace the InvokeRequired and Invoke in a class?
protected void MyMethod()
{
if (InvokeRequired)
{
Invoke(new DelegateVoid(MyMethod));
return;
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
First time I hear of guts in a form :-) It's a very opened description of what you are trying to achieve.
What are those "guts"?
And what is that "object" that you are returning to the form?
What are those "guts"?
And what is that "object" that you are returning to the form?
ASKER
What I meant by guts is taking the code from the win forms and putting it into the DLL. I commented the code in the winforms and ran it with modifications and see that I probably don't need it. It seems to be used for events that get fired. I just put methods in one place and it provided the same solution in winforms which is what I'm trying to achieve in my DLL. Now I'm working on solving another issue with it. Thanks.
ASKER