Click here to Skip to main content
16,006,006 members
Home / Discussions / C#
   

C#

 
QuestionTimer in C# - Tick not available Pin
Femtofarad14-Nov-09 11:31
Femtofarad14-Nov-09 11:31 
AnswerRe: Timer in C# - Tick not available Pin
Luc Pattyn14-Nov-09 11:43
sitebuilderLuc Pattyn14-Nov-09 11:43 
GeneralRe: Timer in C# - Tick not available Pin
Femtofarad14-Nov-09 11:50
Femtofarad14-Nov-09 11:50 
GeneralRe: Timer in C# - Tick not available Pin
Luc Pattyn14-Nov-09 11:52
sitebuilderLuc Pattyn14-Nov-09 11:52 
GeneralRe: Timer in C# - Tick not available Pin
Femtofarad14-Nov-09 11:57
Femtofarad14-Nov-09 11:57 
AnswerRe: Timer in C# - Tick not available Pin
Shameel14-Nov-09 22:32
professionalShameel14-Nov-09 22:32 
AnswerRe: Timer in C# - Tick not available Pin
Femtofarad15-Nov-09 0:48
Femtofarad15-Nov-09 0:48 
QuestionThread problem... Pin
Mc_Topaz14-Nov-09 11:14
Mc_Topaz14-Nov-09 11:14 
I'm developing a chat server and a chat client in C#.

My client application is a GUI with some TabControls, ListBoxes, Buttons, Textboxes and Labels. The client also has a separate thread to detect messages sent from the server.

One of the messages sent from the server is to display what other users are available to chat with.
I can receive the other users IP-address and store them in a collection. When this is done I send an event from the thread method to the Client's GUI's Form-class and run a method to display the users.
That method is just clearing all items in a ListBox and insert all IP-addresses into the ListBox by foreach-looping the collection sent as a parameter from the event.

When I try this an: InvalidOperationException is thrown. The exception messages basically says this (translated from Swedish):

"The actions between threads are not valid. The control lstOtherUsers (the name of the ListBox) are received from an other thread that it was created in"

I can understand the problem why I cannot update the Item collection in my ListBox from an other thread when the ListBox was created in an other thread. But how shall I solve this?
AnswerRe: Thread problem... Pin
kstls14-Nov-09 11:40
kstls14-Nov-09 11:40 
GeneralRe: Thread problem... Pin
Mc_Topaz14-Nov-09 12:29
Mc_Topaz14-Nov-09 12:29 
AnswerRe: Thread problem... Pin
Luc Pattyn14-Nov-09 11:45
sitebuilderLuc Pattyn14-Nov-09 11:45 
AnswerRe: Thread problem... Pin
Shameel14-Nov-09 22:39
professionalShameel14-Nov-09 22:39 
Questionquery: how to include only specific players Pin
rooster215414-Nov-09 10:25
rooster215414-Nov-09 10:25 
Questionvideo clip in c# Pin
rizwana rashid14-Nov-09 10:14
rizwana rashid14-Nov-09 10:14 
AnswerRe: video clip in c# Pin
Dave Kreskowiak14-Nov-09 11:18
mveDave Kreskowiak14-Nov-09 11:18 
AnswerRe: video clip in c# Pin
Dipin Behl14-Nov-09 21:59
Dipin Behl14-Nov-09 21:59 
GeneralRe: video clip in c# Pin
rizwana rashid15-Nov-09 19:10
rizwana rashid15-Nov-09 19:10 
QuestionUse a textbox to search on a site? Pin
ahlm14-Nov-09 9:30
ahlm14-Nov-09 9:30 
AnswerRe: Use a textbox to search on a site? Pin
Luc Pattyn14-Nov-09 9:57
sitebuilderLuc Pattyn14-Nov-09 9:57 
GeneralRe: Use a textbox to search on a site? Pin
ahlm14-Nov-09 9:58
ahlm14-Nov-09 9:58 
Questionlooking for add-on for visual studio 2008 Pin
E_Gold14-Nov-09 9:09
E_Gold14-Nov-09 9:09 
AnswerRe: looking for add-on for visual studio 2008 Pin
N a v a n e e t h14-Nov-09 9:13
N a v a n e e t h14-Nov-09 9:13 
AnswerRe: looking for add-on for visual studio 2008 Pin
Dave Kreskowiak14-Nov-09 11:17
mveDave Kreskowiak14-Nov-09 11:17 
AnswerRe: looking for add-on for visual studio 2008 Pin
PIEBALDconsult15-Nov-09 4:14
mvePIEBALDconsult15-Nov-09 4:14 
QuestionVS2008: 2 Projects in One Soltution, sharing UserControls ? Pin
sodevrom14-Nov-09 9:02
sodevrom14-Nov-09 9:02 

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.