Click here to Skip to main content
14,455,303 members

.NET Framework

 
QuestionUsing DataAdapter update and returning the id Pin
d-_-b14-Mar-07 6:09
Memberd-_-b14-Mar-07 6:09 
QuestionScreen color depth conversion Pin
priyank_ldce14-Mar-07 5:46
Memberpriyank_ldce14-Mar-07 5:46 
QuestionDatabase ConnectionProblem Pin
micydon13-Mar-07 22:21
Membermicydon13-Mar-07 22:21 
AnswerRe: Database ConnectionProblem Pin
led mike14-Mar-07 7:32
Memberled mike14-Mar-07 7:32 
QuestionDoc Conversion Pin
Fahima_Tahir13-Mar-07 11:02
MemberFahima_Tahir13-Mar-07 11:02 
AnswerRe: Doc Conversion Pin
Pete O'Hanlon14-Mar-07 1:13
communityengineerPete O'Hanlon14-Mar-07 1:13 
QuestionOverrided install sub problem Pin
Memo Soso13-Mar-07 5:55
MemberMemo Soso13-Mar-07 5:55 
QuestionHelp: how to have a binding to correctly update a form? Pin
Spulit13-Mar-07 3:56
MemberSpulit13-Mar-07 3:56 
Hi there,

I'm new to .net programming and I've been using C++/CLI to develop a new application. I now have the following problem:
I have a Timer which has an ElapsedEventHandler defined.

Acoustics::Acoustics()
{
timer = gcnew System::Timers::Timer();
timer->Elapsed += gcnew ElapsedEventHandler(this, &Acoustics::timerUpdate);
}

void Acoustics::timerUpdate(Object^ sender, ElapsedEventArgs^ e)
{
ch->LastRxSignalElapsedTime += TimeSpan::FromSeconds(0.1);
ch->LastTxSignalElapsedTime += TimeSpan::FromSeconds(0.1);
}

"ch->LastRxSignalElapsedTime" and "ch->LastTxSignalElapsedTime" are properties in this class.
In the GUI, I define some bindings to these properties:

Label ^labelchrxtimer = (gcnew Label());
labelchrxtimer->DataBindings->Add(gcnew Binding("Text", kvp.Value, "LastRxSignalElapsedTime"));

Label ^labelchtxtimer = (gcnew Label());
labelchtxtimer->DataBindings->Add(gcnew Binding("Text", kvp.Value, "LastTxSignalElapsedTime"));

Now, when ElapsedEventHandler is executed, it is in a different thread, so the labels are not automatically updated by the bindings because the properties were changed by a different thread than the one that created the labels.
How can I have the labels correctly updated?

Thanks,

Spulit

QuestionFTP upload Pin
jchigg200012-Mar-07 11:17
Memberjchigg200012-Mar-07 11:17 
AnswerRe: FTP upload Pin
Dave Kreskowiak12-Mar-07 13:52
mveDave Kreskowiak12-Mar-07 13:52 
Questiondynamic pictureBox creation Pin
sarah_malik12-Mar-07 7:48
Membersarah_malik12-Mar-07 7:48 
AnswerRe: dynamic pictureBox creation Pin
Paul Selormey12-Mar-07 16:02
MemberPaul Selormey12-Mar-07 16:02 
GeneralRe: dynamic pictureBox creation Pin
sarah_malik13-Mar-07 2:07
Membersarah_malik13-Mar-07 2:07 
Questionhelp me to make my program work faster Pin
thesad12-Mar-07 6:23
Memberthesad12-Mar-07 6:23 
AnswerRe: help me to make my program work faster Pin
MikeMarq12-Mar-07 6:43
MemberMikeMarq12-Mar-07 6:43 
GeneralRe: help me to make my program work faster Pin
thesad12-Mar-07 6:52
Memberthesad12-Mar-07 6:52 
GeneralRe: help me to make my program work faster Pin
Pete O'Hanlon12-Mar-07 7:00
communityengineerPete O'Hanlon12-Mar-07 7:00 
GeneralRe: help me to make my program work faster Pin
MikeMarq12-Mar-07 8:41
MemberMikeMarq12-Mar-07 8:41 
GeneralRe: help me to make my program work faster Pin
thesad12-Mar-07 10:52
Memberthesad12-Mar-07 10:52 
GeneralRe: help me to make my program work faster Pin
Luc Pattyn12-Mar-07 13:45
sitebuilderLuc Pattyn12-Mar-07 13:45 
GeneralRe: help me to make my program work faster [modified] Pin
thesad12-Mar-07 20:10
Memberthesad12-Mar-07 20:10 
AnswerRe: how to overlap image Pin
Dave Kreskowiak12-Mar-07 5:55
mveDave Kreskowiak12-Mar-07 5:55 
Questionhow to start a windows application at windows start up in c# Pin
sainyam12-Mar-07 1:12
Membersainyam12-Mar-07 1:12 
AnswerRe: how to start a windows application at windows start up in c# Pin
Colin Angus Mackay12-Mar-07 1:28
MemberColin Angus Mackay12-Mar-07 1:28 
AnswerRe: how to start a windows application at windows start up in c# Pin
Dave Kreskowiak12-Mar-07 5:51
mveDave Kreskowiak12-Mar-07 5:51 

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.