|
-
Jun 16th, 2007, 11:14 AM
#1
Thread Starter
Addicted Member
[2005] New to VB.Net - Doubt about calling controls from external functions
OK, I decided to start looking at VB.Net, and I've been having some problems with something as simple as enabling buttons.
I have a class that raises an event in a thread running at the background. When the event is raised I make a simple comprobation like, in order to enable a button.
If Not btnSendMsg.Enabled Then btnSendMsg.Enabled = True.
However this throws an error because it's a different subroutine (or subprocess, I don't know which is the correct English term here). So after looking at Visual Studio help I've seen I have to force the invoking of a callback.
Is this always so? Is it correct to disable the CheckForIllegalCrossThreadCalls property?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|