Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
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 
This is what I am doing to use threading to populate a listbox.
Question:
Do you know how I can write to the text of the winform? i.e. this.text fails

//Thread...
private System.Threading.Thread t = null;
delegate void AddToListDel(string text);

private void AddToListbox(string text)
{
if (this.lstProfileInsertStatusError.InvokeRequired)
{
AddToListDel a = new AddToListDel(AddToListbox);
this.lstProfileInsertStatusError.Invoke(a, new object[] { text });
}
else
{
this.lstProfileInsertStatusError.Items.Add(text);
}
}

private void myButton_click()
{
t = new System.Threading.Thread(new System.Threading.ThreadStart(this.GetProfileElementsValues));
t.Start();
}

private void GetProfileElementsValues()
{
//this line works
AddToListbox("START TIME : " + DateTime.Now.ToShortTimeString());

//this line fails
this.text = "processing " + i;
}

Any thoughts on how to solve this issue please?

I believe I need to have something similar to AddToListbox(string text) but for the text of the form?

Thank you
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 
AnswerRe: threading Pin
aalex67531-Oct-08 6:50
aalex67531-Oct-08 6:50 
AnswerRe: threading Pin
Giorgi Dalakishvili31-Oct-08 8:28
mentorGiorgi Dalakishvili31-Oct-08 8:28 
GeneralRe: threading Pin
arkiboys31-Oct-08 9:31
arkiboys31-Oct-08 9:31 
GeneralRe: threading Pin
Giorgi Dalakishvili31-Oct-08 9:43
mentorGiorgi Dalakishvili31-Oct-08 9:43 
QuestionAdvice on what driver to use for multiple Webcam capture Pin
Franko197331-Oct-08 5:20
Franko197331-Oct-08 5:20 
QuestionDetecting when user has changed selection to another row (single selection item grid) Pin
kanchoette31-Oct-08 3:31
kanchoette31-Oct-08 3:31 
AnswerRe: Detecting when user has changed selection to another row (single selection item grid) Pin
Ashfield31-Oct-08 4:53
Ashfield31-Oct-08 4:53 
GeneralRe: Detecting when user has changed selection to another row (single selection item grid) Pin
led mike31-Oct-08 4:55
led mike31-Oct-08 4:55 
GeneralRe: Detecting when user has changed selection to another row (single selection item grid) Pin
Ashfield31-Oct-08 5:55
Ashfield31-Oct-08 5:55 
QuestionHow I Change Menu Css on page load Event OR Runtime Pin
IshtiaqueJ31-Oct-08 2:30
IshtiaqueJ31-Oct-08 2:30 
AnswerRe: How I Change Menu Css on page load Event OR Runtime Pin
Krazy Programmer31-Oct-08 2:53
Krazy Programmer31-Oct-08 2:53 
AnswerRe: How I Change Menu Css on page load Event OR Runtime Pin
leppie31-Oct-08 2:57
leppie31-Oct-08 2:57 
GeneralServiceController remote access, impersonation Pin
laserbaronen31-Oct-08 2:20
laserbaronen31-Oct-08 2:20 
QuestionDictionary size issue Pin
George_George31-Oct-08 2:16
George_George31-Oct-08 2:16 
AnswerRe: Dictionary size issue Pin
Luc Pattyn31-Oct-08 2:25
sitebuilderLuc Pattyn31-Oct-08 2:25 

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.