Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

 

I am having troubles find out if InvokeRequired is true or false.

My Console application does not like the following code.

 

If Me.InvokeRequired Then
 Me.Invoke(New _DisplayMessage(AddressOf DisplayMessage))
Else
 DisplayMessage()
End If

 

"Me" is not valid within a module.

 

What can I do instead?

 

Thanks.

Simon

  • Administrators
Posted
Not too sure what you are trying to do here as the InvokeRequired property is designed to let you know if you are attempting to update a form / controls UI from a thread other than the primary thread - the console isn't a form and shouldn't require this check anyway.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...