Click here to Skip to main content
15,917,709 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to retreive correct control.visible property of a hidden control in c# Pin
Giorgi Dalakishvili31-Oct-08 11:45
mentorGiorgi Dalakishvili31-Oct-08 11:45 
GeneralRe: how to retreive correct control.visible property of a hidden control in c# Pin
Luc Pattyn31-Oct-08 12:21
sitebuilderLuc Pattyn31-Oct-08 12:21 
QuestionRe: how to retreive correct control.visible property of a hidden control in c# Pin
nelsonpaixao31-Oct-08 13:49
nelsonpaixao31-Oct-08 13:49 
AnswerRe: how to retreive correct control.visible property of a hidden control in c# Pin
Dave Kreskowiak1-Nov-08 5:20
mveDave Kreskowiak1-Nov-08 5:20 
QuestionList<int> in wpf designer</int> [modified] Pin
vincentgr31-Oct-08 8:02
vincentgr31-Oct-08 8:02 
AnswerRe: List in wpf designer Pin
Pedram Behroozi31-Oct-08 8:16
Pedram Behroozi31-Oct-08 8:16 
GeneralRe: List in wpf designer Pin
vincentgr31-Oct-08 8:33
vincentgr31-Oct-08 8:33 
GeneralRe: List in wpf designer Pin
Pedram Behroozi31-Oct-08 8:41
Pedram Behroozi31-Oct-08 8:41 
QuestionSNMP Trap or Packet Listner Program --Socket Question. Please advice Pin
jobin00700731-Oct-08 7:23
jobin00700731-Oct-08 7:23 
AnswerRe: SNMP Trap or Packet Listner Program --Socket Question. Please advice Pin
jobin0070075-Nov-08 15:54
jobin0070075-Nov-08 15:54 
QuestionTabControl question Pin
aalex67531-Oct-08 6:29
aalex67531-Oct-08 6:29 
AnswerRe: TabControl question Pin
Pedram Behroozi31-Oct-08 7:33
Pedram Behroozi31-Oct-08 7:33 
GeneralRe: TabControl question Pin
aalex67531-Oct-08 7:37
aalex67531-Oct-08 7:37 
GeneralRe: TabControl question Pin
Pedram Behroozi31-Oct-08 7:56
Pedram Behroozi31-Oct-08 7:56 
QuestionHow to get a list of open files? Pin
Dirk.Bock31-Oct-08 5:40
Dirk.Bock31-Oct-08 5:40 
AnswerRe: How to get a list of open files? Pin
Eddy Vluggen31-Oct-08 5:57
professionalEddy Vluggen31-Oct-08 5:57 
AnswerRe: How to get a list of open files? Pin
Giorgi Dalakishvili31-Oct-08 8:42
mentorGiorgi Dalakishvili31-Oct-08 8:42 
QuestionMerchant Connect - Webservice anyone? Pin
sameerhanda31-Oct-08 5:37
sameerhanda31-Oct-08 5:37 
AnswerRe: Merchant Connect - Webservice anyone? Pin
Paul Conrad31-Oct-08 7:34
professionalPaul Conrad31-Oct-08 7:34 
Questionlistbox population Pin
arkiboys31-Oct-08 5:27
arkiboys31-Oct-08 5:27 
AnswerRe: listbox population Pin
Eddy Vluggen31-Oct-08 5:48
professionalEddy Vluggen31-Oct-08 5:48 
GeneralRe: listbox population Pin
Luc Pattyn31-Oct-08 7:14
sitebuilderLuc Pattyn31-Oct-08 7:14 
Questionthreading Pin
arkiboys31-Oct-08 5:25
arkiboys31-Oct-08 5:25 
AnswerRe: threading Pin
Eddy Vluggen31-Oct-08 5:53
professionalEddy Vluggen31-Oct-08 5:53 
AnswerRe: threading Pin
Guffa31-Oct-08 6:48
Guffa31-Oct-08 6:48 
You can only access the controls from the thread that created them, i.e the main thread.

There are basically two ways of doing that:

1. Use Invoke to make the main thread execute the code, just like you do in the AddToListbox method. If you know that you are always doing that from a background thread, you don't have to check the InvikeRequired property, but just invoke the code directly.

2. Put the data in a synchronised variable (use the lock keyword to synchronise both when reading and writing), where the main thread can look for it and put it in the control.

Despite everything, the person most likely to be fooling you next is yourself.

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.