Click here to Skip to main content
15,123,851 members
Home / Discussions / C#
   

C#

 
QuestionHow to implement class /component Versioning using abstract class in c# Pin
Tridip Bhattacharjee10-Feb-16 22:51
professionalTridip Bhattacharjee10-Feb-16 22:51 
AnswerRe: How to implement class /component Versioning using abstract class in c# Pin
Richard MacCutchan10-Feb-16 23:03
mveRichard MacCutchan10-Feb-16 23:03 
GeneralRe: How to implement class /component Versioning using abstract class in c# Pin
Tridip Bhattacharjee11-Feb-16 22:50
professionalTridip Bhattacharjee11-Feb-16 22:50 
GeneralRe: How to implement class /component Versioning using abstract class in c# Pin
Richard MacCutchan11-Feb-16 23:14
mveRichard MacCutchan11-Feb-16 23:14 
QuestionHow to red variable continuously Pin
Zefir110-Feb-16 21:34
MemberZefir110-Feb-16 21:34 
AnswerRe: How to red variable continuously Pin
OriginalGriff10-Feb-16 21:50
mveOriginalGriff10-Feb-16 21:50 
GeneralRe: How to red variable continuously Pin
Zefir110-Feb-16 22:20
MemberZefir110-Feb-16 22:20 
GeneralRe: How to red variable continuously Pin
OriginalGriff10-Feb-16 22:38
mveOriginalGriff10-Feb-16 22:38 
Well...that code reads from the PLC only once (when the form loads) and then closes and Disposes your channel immediately.
So when the form is displayed, the PLC isn't communicating with the application at all - and couldn't if it wanted to because the connection isn't there any more.

Probably, you want to move that into a different thread, and make it loop to read the values, and then update the textboxes.

I'd suggest that you look at a BackgroundWorker[^] as that allows you to use the Progress to pass the messages back to the main thread for display (you can't change UI items from any thread except the main thread) via the BackgroundWorker.ProgressChanged Event (System.ComponentModel)[^] - the ProgressChangedEventArgs contains a UserState property you can transfer it in.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

QuestionFTP vs SCP Pin
Kevin Marois10-Feb-16 8:42
professionalKevin Marois10-Feb-16 8:42 
AnswerRe: FTP vs SCP Pin
Richard Deeming10-Feb-16 11:11
mveRichard Deeming10-Feb-16 11:11 
GeneralRe: FTP vs SCP Pin
Kevin Marois10-Feb-16 11:29
professionalKevin Marois10-Feb-16 11:29 
GeneralRe: FTP vs SCP Pin
Eddy Vluggen10-Feb-16 11:41
professionalEddy Vluggen10-Feb-16 11:41 
QuestionBeginner on TCP Server/Client Implementation Pin
Member 1018338210-Feb-16 7:18
MemberMember 1018338210-Feb-16 7:18 
QuestionProgrammatically login to website that uses 2 steps. Pin
Vouksh10-Feb-16 3:18
MemberVouksh10-Feb-16 3:18 
AnswerRe: Programmatically login to website that uses 2 steps. Pin
OriginalGriff10-Feb-16 5:14
mveOriginalGriff10-Feb-16 5:14 
GeneralRe: Programmatically login to website that uses 2 steps. Pin
Vouksh10-Feb-16 5:30
MemberVouksh10-Feb-16 5:30 
GeneralRe: Programmatically login to website that uses 2 steps. Pin
Luc Pattyn11-Feb-16 1:29
sitebuilderLuc Pattyn11-Feb-16 1:29 
GeneralRe: Programmatically login to website that uses 2 steps. Pin
OriginalGriff11-Feb-16 1:35
mveOriginalGriff11-Feb-16 1:35 
SuggestionRe: Programmatically login to website that uses 2 steps. Pin
Richard Deeming10-Feb-16 5:16
mveRichard Deeming10-Feb-16 5:16 
AnswerRe: Programmatically login to website that uses 2 steps. Pin
V.10-Feb-16 21:21
professionalV.10-Feb-16 21:21 
QuestionIssue with Serial Port class Pin
Member 1206160010-Feb-16 0:13
MemberMember 1206160010-Feb-16 0:13 
SuggestionRe: Issue with Serial Port class Pin
Richard MacCutchan10-Feb-16 1:14
mveRichard MacCutchan10-Feb-16 1:14 
GeneralRe: Issue with Serial Port class Pin
Member 1206160010-Feb-16 1:23
MemberMember 1206160010-Feb-16 1:23 
GeneralRe: Issue with Serial Port class Pin
Richard MacCutchan10-Feb-16 1:30
mveRichard MacCutchan10-Feb-16 1:30 
GeneralRe: Issue with Serial Port class Pin
Member 1206160010-Feb-16 1:38
MemberMember 1206160010-Feb-16 1:38 

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.