Click here to Skip to main content
15,897,968 members
Home / Discussions / C#
   

C#

 
AnswerRe: Calculate the age in years,months and days using the datetimepicker. Pin
stancrm7-Apr-09 0:27
stancrm7-Apr-09 0:27 
AnswerRe: Calculate the age in years,months and days using the datetimepicker. Pin
DaveyM697-Apr-09 1:02
professionalDaveyM697-Apr-09 1:02 
AnswerRe: Calculate the age in years,months and days using the datetimepicker. Pin
Henry Minute7-Apr-09 1:04
Henry Minute7-Apr-09 1:04 
AnswerRe: Calculate the age in years,months and days using the datetimepicker. Pin
Luc Pattyn7-Apr-09 3:50
sitebuilderLuc Pattyn7-Apr-09 3:50 
QuestionWriting to ListBox from multiple threads Pin
Bruce Coward7-Apr-09 0:00
Bruce Coward7-Apr-09 0:00 
AnswerRe: Writing to ListBox from multiple threads Pin
Nicholas Butler7-Apr-09 0:52
sitebuilderNicholas Butler7-Apr-09 0:52 
GeneralRe: Writing to ListBox from multiple threads Pin
Bruce Coward7-Apr-09 1:04
Bruce Coward7-Apr-09 1:04 
GeneralRe: Writing to ListBox from multiple threads Pin
Nicholas Butler7-Apr-09 1:19
sitebuilderNicholas Butler7-Apr-09 1:19 
Assuming Form1 is your main form and you only have one instance of it, put this in Form1:

static Form1 _Instance = null;

public Form1()
{
  if ( _Instance != null ) [ throw an exception or assert or something ]
  _Instance = this;
}

public static void LogMessage( string message )
{
  _Instance.log( message );
}


Then use this from your threads:

Form1.LogMessage( message );


Nick

----------------------------------
Be excellent to each other Smile | :)

GeneralRe: Writing to ListBox from multiple threads Pin
Luc Pattyn7-Apr-09 3:53
sitebuilderLuc Pattyn7-Apr-09 3:53 
AnswerRe: Writing to ListBox from multiple threads Pin
Henry Minute7-Apr-09 1:15
Henry Minute7-Apr-09 1:15 
GeneralRe: Writing to ListBox from multiple threads Pin
Nicholas Butler7-Apr-09 1:23
sitebuilderNicholas Butler7-Apr-09 1:23 
GeneralRe: Writing to ListBox from multiple threads Pin
Henry Minute7-Apr-09 1:35
Henry Minute7-Apr-09 1:35 
GeneralRe: Writing to ListBox from multiple threads Pin
Bruce Coward7-Apr-09 1:24
Bruce Coward7-Apr-09 1:24 
GeneralRe: Writing to ListBox from multiple threads Pin
Henry Minute7-Apr-09 1:35
Henry Minute7-Apr-09 1:35 
GeneralRe: Writing to ListBox from multiple threads Pin
Bruce Coward7-Apr-09 1:40
Bruce Coward7-Apr-09 1:40 
AnswerRe: Writing to ListBox from multiple threads Pin
DaveyM697-Apr-09 2:22
professionalDaveyM697-Apr-09 2:22 
AnswerRe: Writing to ListBox from multiple threads Pin
Luc Pattyn7-Apr-09 4:05
sitebuilderLuc Pattyn7-Apr-09 4:05 
GeneralRe: Writing to ListBox from multiple threads - OT Pin
DaveyM697-Apr-09 5:14
professionalDaveyM697-Apr-09 5:14 
GeneralRe: Writing to ListBox from multiple threads - OT Pin
Luc Pattyn7-Apr-09 5:31
sitebuilderLuc Pattyn7-Apr-09 5:31 
Questionproblem when writing to eventlog Pin
prasadbuddhika6-Apr-09 23:56
prasadbuddhika6-Apr-09 23:56 
QuestionCreating a Collection of User Defined classes in a namespace and Invoking each class dynamicly Pin
grealish6-Apr-09 23:52
grealish6-Apr-09 23:52 
Questionan installation problem of excel addin Pin
abhiram_nayan6-Apr-09 23:48
abhiram_nayan6-Apr-09 23:48 
AnswerRe: an installation problem of excel addin Pin
abhiram_nayan7-Apr-09 20:16
abhiram_nayan7-Apr-09 20:16 
QuestionSession level connection object Pin
abhishek agrawal19836-Apr-09 23:07
abhishek agrawal19836-Apr-09 23:07 
Questionviewing all fonts in "windows/fonts" Pin
tai-fun6-Apr-09 22:42
tai-fun6-Apr-09 22:42 

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.