Click here to Skip to main content
15,890,123 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to connect an electrical switch to my vb.net application via USB port? Pin
dusty_dex6-Jul-13 5:08
dusty_dex6-Jul-13 5:08 
GeneralRe: How to connect an electrical switch to my vb.net application via USB port? Pin
aeskan6-Jul-13 14:25
aeskan6-Jul-13 14:25 
QuestionSetting up Delegates for Threads Pin
treddie5-Jul-13 12:18
treddie5-Jul-13 12:18 
AnswerRe: Setting up Delegates for Threads Pin
Ron Beyer5-Jul-13 12:27
professionalRon Beyer5-Jul-13 12:27 
GeneralRe: Setting up Delegates for Threads Pin
treddie5-Jul-13 13:59
treddie5-Jul-13 13:59 
GeneralRe: Setting up Delegates for Threads Pin
Ron Beyer6-Jul-13 2:56
professionalRon Beyer6-Jul-13 2:56 
GeneralRe: Setting up Delegates for Threads Pin
treddie6-Jul-13 8:30
treddie6-Jul-13 8:30 
GeneralRe: Setting up Delegates for Threads Pin
GuyThiebaut8-Jul-13 22:06
professionalGuyThiebaut8-Jul-13 22:06 
This may be of help for referencing items on a separate thread:

Create an extension method to invoke items:

VB
Module Extensions

    <Runtime.CompilerServices.Extension()> _
    Sub SynchronisedInvoke(synchMe As ISynchronizeInvoke, action As Action)

        If Not synchMe.InvokeRequired Then

            action()

        Else

            synchMe.Invoke(action, New Object() {})

        End If

    End Sub


End Module



Then you can reference the item on the other thread with the use of a lambda:

VB
lblMessage.SynchronisedInvoke(Sub() lblMessage.Text = "Hello World")

“That which can be asserted without evidence, can be dismissed without evidence.”

― Christopher Hitchens

GeneralRe: Setting up Delegates for Threads Pin
treddie9-Jul-13 19:21
treddie9-Jul-13 19:21 
Questionvbscript Pin
johnjsm5-Jul-13 2:41
johnjsm5-Jul-13 2:41 
AnswerRe: vbscript Pin
Tim Carmichael5-Jul-13 3:42
Tim Carmichael5-Jul-13 3:42 
AnswerRe: vbscript Pin
Dave Kreskowiak5-Jul-13 4:02
mveDave Kreskowiak5-Jul-13 4:02 
AnswerRe: vbscript Pin
Richard Deeming5-Jul-13 4:07
mveRichard Deeming5-Jul-13 4:07 
AnswerRe: vbscript Pin
AlphaDeltaTheta5-Jul-13 20:00
AlphaDeltaTheta5-Jul-13 20:00 
QuestionWhy does .ThreadState.ToString Behave This Way? Pin
treddie4-Jul-13 20:37
treddie4-Jul-13 20:37 
AnswerRe: Why does .ThreadState.ToString Behave This Way? Pin
AlphaDeltaTheta4-Jul-13 21:19
AlphaDeltaTheta4-Jul-13 21:19 
GeneralRe: Why does .ThreadState.ToString Behave This Way? Pin
treddie4-Jul-13 21:37
treddie4-Jul-13 21:37 
AnswerRe: Why does .ThreadState.ToString Behave This Way? Pin
AlphaDeltaTheta4-Jul-13 21:49
AlphaDeltaTheta4-Jul-13 21:49 
GeneralRe: Why does .ThreadState.ToString Behave This Way? Pin
treddie4-Jul-13 23:22
treddie4-Jul-13 23:22 
JokeRe: Why does .ThreadState.ToString Behave This Way? Pin
Tim Carmichael5-Jul-13 2:42
Tim Carmichael5-Jul-13 2:42 
GeneralRe: Why does .ThreadState.ToString Behave This Way? Pin
Dave Kreskowiak5-Jul-13 3:57
mveDave Kreskowiak5-Jul-13 3:57 
GeneralRe: Why does .ThreadState.ToString Behave This Way? Pin
treddie5-Jul-13 11:38
treddie5-Jul-13 11:38 
GeneralRe: Why does .ThreadState.ToString Behave This Way? Pin
Ron Beyer5-Jul-13 12:20
professionalRon Beyer5-Jul-13 12:20 
GeneralRe: Why does .ThreadState.ToString Behave This Way? Pin
treddie5-Jul-13 19:34
treddie5-Jul-13 19:34 
GeneralRe: Why does .ThreadState.ToString Behave This Way? Pin
Dave Kreskowiak6-Jul-13 4:11
mveDave Kreskowiak6-Jul-13 4:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.