Click here to Skip to main content
15,919,245 members
Home / Discussions / C#
   

C#

 
QuestionHow to read data from COM port (want to get remote to work) Pin
daniilzol30-Dec-06 10:48
daniilzol30-Dec-06 10:48 
AnswerRe: How to read data from COM port (want to get remote to work) Pin
Dave Kreskowiak30-Dec-06 11:29
mveDave Kreskowiak30-Dec-06 11:29 
GeneralRe: How to read data from COM port (want to get remote to work) [modified] Pin
daniilzol30-Dec-06 11:46
daniilzol30-Dec-06 11:46 
GeneralRe: How to read data from COM port (want to get remote to work) Pin
gnadeem30-Dec-06 13:29
gnadeem30-Dec-06 13:29 
GeneralRe: How to read data from COM port (want to get remote to work) Pin
daniilzol30-Dec-06 14:54
daniilzol30-Dec-06 14:54 
GeneralRe: How to read data from COM port (want to get remote to work) [modified] Pin
Luc Pattyn30-Dec-06 16:11
sitebuilderLuc Pattyn30-Dec-06 16:11 
GeneralRe: How to read data from COM port (want to get remote to work) Pin
daniilzol31-Dec-06 8:13
daniilzol31-Dec-06 8:13 
QuestionSocket IO interaction with UI Message pump Question? Pin
Member 288953130-Dec-06 10:43
Member 288953130-Dec-06 10:43 
Hi I have and application that’s rather complex and componentized, but it wont work all the time when it’s all assembled and compiled. So let me try and get to the point of my problem. The application is composed of a series of threads coupled to some UI. Some of the UI has Socket implementation for talking to a remote device. Each UI component is a Windows Control and has properties and Functions for Access by the other threads running in the application. All the public functions call invoke internally to prevent any UI thread Problems and the Properties Use the Monitor lock to prevent Two threads from changing the properties wall reading or another thread changing them simultaneously. I have Blocking functions in the UI components that need them that look like this:

public override void WateForAck()
{
if (this.InvokeRequired)
this.Invoke(new WateForAckDelegate(WateForAck), new object[] { });
else
{
DateTime EndTime;

EndTime = DateTime.Now + (new TimeSpan(0, 0, 0, 0, viewSequencer.COMMAND_TIME));
while (true)
{
if (WaitHandle.WaitAll((new ManualResetEvent[] { this.BusyEvent }), new TimeSpan(viewSequencer.SAMPLE_TIME), false))
{
if (this.GetState() == Indecator.ESTATES.Error)
this.PostError(this.Channel, 0);
return;
}
if (EndTime < DateTime.Now)
{
Debug.WriteLine(String.Format("Ack timed out on: {0}, {1}.", this.Device, this.Channel));
this.PostError(this.Channel, 0);
this.BusyEvent.Set();
this.SetCursor(false);
return;
}
Application.DoEvents();
//Debug.WriteLine(String.Format("WateForAck on: {0}, {1}.", this.Device, this.Channel));
}
}
}

According to and article I read, on not using the “Application.DoEvents” as I could cose message prosesing problumes in my Application I should be able to elimanat this function call “Application.DoEvents”, but when I do the Sockit IO gets very slow and after a cople of minits fails to connect to the remote device. Question is do’s anyone now whay the “Application.DoEvents” function is interaction with the Socket IO? And is there a better way to let the Socket IO work in background so I can remove the “Application.DoEvents” function?


Guy Winslow
Software Engineer
GDW Engineering
gdwinslo@sonic.net
925-606-5944

AnswerRe: Socket IO interaction with UI Message pump Question? Pin
Phillip M. Hoff30-Dec-06 17:00
Phillip M. Hoff30-Dec-06 17:00 
Questionproblem for set RememberMe CheckBox in ASP.net Login Control. Pin
hdv21230-Dec-06 10:04
hdv21230-Dec-06 10:04 
AnswerRe: problem for set RememberMe CheckBox in ASP.net Login Control. Pin
Brad Bruce30-Dec-06 10:59
Brad Bruce30-Dec-06 10:59 
QuestionGUI for remote reboots using Shutdown command Pin
namedalias530-Dec-06 8:09
namedalias530-Dec-06 8:09 
AnswerRe: GUI for remote reboots using Shutdown command Pin
Luc Pattyn30-Dec-06 8:54
sitebuilderLuc Pattyn30-Dec-06 8:54 
GeneralRe: GUI for remote reboots using Shutdown command Pin
namedalias530-Dec-06 9:02
namedalias530-Dec-06 9:02 
GeneralRe: GUI for remote reboots using Shutdown command Pin
Luc Pattyn30-Dec-06 9:25
sitebuilderLuc Pattyn30-Dec-06 9:25 
GeneralRe: GUI for remote reboots using Shutdown command Pin
namedalias530-Dec-06 9:29
namedalias530-Dec-06 9:29 
QuestionFolder Protection.. Pin
kkadir30-Dec-06 8:01
kkadir30-Dec-06 8:01 
AnswerRe: Folder Protection.. Pin
Luc Pattyn30-Dec-06 8:56
sitebuilderLuc Pattyn30-Dec-06 8:56 
AnswerRe: Folder Protection.. Pin
Ami Bar30-Dec-06 10:28
Ami Bar30-Dec-06 10:28 
GeneralRe: Folder Protection.. Pin
kkadir30-Dec-06 11:39
kkadir30-Dec-06 11:39 
GeneralRe: Folder Protection.. Pin
Dave Kreskowiak30-Dec-06 17:08
mveDave Kreskowiak30-Dec-06 17:08 
AnswerKind of Pin
Ennis Ray Lynch, Jr.30-Dec-06 17:38
Ennis Ray Lynch, Jr.30-Dec-06 17:38 
QuestionOpen "Windows Image Fax Viewer" Pin
greekius30-Dec-06 7:33
greekius30-Dec-06 7:33 
AnswerRe: Open "Windows Image Fax Viewer" Pin
Luc Pattyn30-Dec-06 9:21
sitebuilderLuc Pattyn30-Dec-06 9:21 
AnswerRe: Open "Windows Image Fax Viewer" Pin
Luc Pattyn30-Dec-06 9:33
sitebuilderLuc Pattyn30-Dec-06 9:33 

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.