Click here to Skip to main content
15,888,521 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralThe sqlcommand is currently busy open, fetching Pin
Eunice (VB junior)23-Apr-08 15:25
Eunice (VB junior)23-Apr-08 15:25 
QuestionCrystal Reports deployment Pin
Jodd23-Apr-08 12:19
Jodd23-Apr-08 12:19 
GeneralRe: Crystal Reports deployment Pin
Steven J Jowett23-Apr-08 12:33
Steven J Jowett23-Apr-08 12:33 
GeneralRe: Crystal Reports deployment Pin
Jodd23-Apr-08 13:29
Jodd23-Apr-08 13:29 
GeneralDeveloping applications for BlackBerry Pin
Mr Oizo23-Apr-08 4:50
Mr Oizo23-Apr-08 4:50 
GeneralRe: Developing applications for BlackBerry Pin
Thomas Stockwell23-Apr-08 8:24
professionalThomas Stockwell23-Apr-08 8:24 
QuestionError QueryInterface while trying to use VB6 DLL into VB.NET project Pin
mandrake_223-Apr-08 4:45
mandrake_223-Apr-08 4:45 
Questionsetting a variable for multiple threads Pin
Tom Deketelaere23-Apr-08 4:23
professionalTom Deketelaere23-Apr-08 4:23 
Background:
I'm making a program to read from smartcards (and write to it)
Setup:
I have a form (with only a richtextbox on it)
And 1 or more threads (with the form thread it's 2 or more) (every smartcardreader attached to the pc get's a seperate thread)
Problem:
I need to be able to set a variable (boolean or other) across all the threads

I have a class witch handles the code for detecting a smartcard inserted or removed and raises an event (witch I catch in my form and thru delegates put something in the textbox)
But as long as my form is processing the card (reading from it and getting user input) the other cardreaders have to wait and can't raise the inserted event.
To this end I thought I only had to declare a public shared variable and set its value (so I could check that in the carddetection code and if needed wait) (I know this is so in java (from my collage days))
Everything I read says that when I declare the variable shared it should be changed in all thread's however when I implement this I find that every thread has his own instance of the variable and one thread can't change the other

Anyone know how I could set a variable across all threads (so from the form thread or from 1 of the created threats for the readers)?
Any help would be appriciated

If my help was helpfull let me know, if not let me know why.

The only way we learn is by making mistakes.

GeneralRe: setting a variable for multiple threads Pin
Luc Pattyn23-Apr-08 11:04
sitebuilderLuc Pattyn23-Apr-08 11:04 
GeneralRe: setting a variable for multiple threads Pin
Tom Deketelaere23-Apr-08 23:10
professionalTom Deketelaere23-Apr-08 23:10 
GeneralFile Open/Close Pin
ritz123423-Apr-08 3:06
ritz123423-Apr-08 3:06 
GeneralRe: File Open/Close Pin
Dave Kreskowiak23-Apr-08 3:38
mveDave Kreskowiak23-Apr-08 3:38 
GeneralRe: File Open/Close Pin
ritz123423-Apr-08 4:32
ritz123423-Apr-08 4:32 
GeneralRe: File Open/Close Pin
Dave Kreskowiak23-Apr-08 9:59
mveDave Kreskowiak23-Apr-08 9:59 
GeneralProblem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 1:14
Balagurunathan S23-Apr-08 1:14 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 1:17
darkelv23-Apr-08 1:17 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 1:27
Balagurunathan S23-Apr-08 1:27 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 1:38
darkelv23-Apr-08 1:38 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 1:44
Balagurunathan S23-Apr-08 1:44 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 1:56
darkelv23-Apr-08 1:56 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 2:06
Balagurunathan S23-Apr-08 2:06 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 2:15
darkelv23-Apr-08 2:15 
Questionstring Replace in vb.net Pin
RajeevKumarSharma23-Apr-08 0:54
RajeevKumarSharma23-Apr-08 0:54 
GeneralRe: string Replace in vb.net Pin
Christian Graus23-Apr-08 1:06
protectorChristian Graus23-Apr-08 1:06 
GeneralRe: string Replace in vb.net Pin
RajeevKumarSharma23-Apr-08 1:28
RajeevKumarSharma23-Apr-08 1:28 

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.