|
will anybody please help meeeeee!
|
|
|
|
|
Hi all,
I am communicating with a serial port using overlapped I/O and I have a very strange problem.When I run my application,it's killed by the system in a random way when i communicate with the serial port.I can't find exact position that it's killed.It seem that the I/O is associated with the system. Anyone have same experience?I appreciate any reply.
|
|
|
|
|
Are you sure you don't have some sort of memory overrun ?
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
Hi all,
I am starting a C# Windows Service. In the Service class, I've added an object to the service class, and OnStart, I initialize this object which creates a socket listener. I use Asynchronous Sockets. So BeginAccept/EndAccept and BeginReceive/EndReceive is used.
My client app connects fine to the server and disconnects fine, but on the server end, the server doesn't recognize the client disconnection.
I receive a OnDataReceived message, which then triggers the EndReceive. I have a sample client-server application that does exactly the same thing, which I've cut-n-pasted from. In the sample, the EndReceive throws a SocketException with the error code 10054 (disconnection). But in my code, the EndReceive just returns 0 bytes received, and no exception is thrown.
Can anyone point me in the right direction?
Cheers,
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
I think that's the expected behavior, according to the MSDN documentation. " If the remote host shuts down the Socket connection with the Shutdown method, and all available data has been received, the EndReceive method will complete immediately and return zero bytes". You can therefore assume that if you get 0 bytes received in EndReceive, the remote client has disconnected.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks Senthil,
I didn't see that in the documentation. Much appreciated.
Jub
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
Does anybody know how to search a word and read values from a file?
I used the method split to read values and separate words but the program doesn't give me the values of the float number. Even this method doesn't give me the correct number of words. It seems to me that it is taken spaces as a words. Any help will be appreciated.
Thank you in advance.
Ps. this is the code...
while(OpenSR.Peek()>=0)
{
string text =OpenSR.ReadLine();//Read line in the file
string [] Data=text.Split(new char[]{' ','\r','\n',',',':','='},10);
foreach(string s in Data)
{
Console.WriteLine("-{0}-", s);
}
Console.WriteLine(Data.Length);
}
|
|
|
|
|
Regular Expressions are what's needed here.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Where do you usually get images/icons from besiding drawing your own..?
Thank you
Elapid For The Win
|
|
|
|
|
Pay a graphic company to make them. There are probably some good link in the recent "logo" post in the lounge.
/\ |_ E X E GG
|
|
|
|
|
google image search
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Try the resources of windows xp in the windows\cursors folder,
and also if you have the visual studio installed try it's resources ,it's very usefull in the Microsoft Visual Studio .NET 2003\common7\ide\graphics
|
|
|
|
|
Search your machine for the extensions applicable to icon or image files (such as ".ico", ".bmp", ".png", ".wmp", ".jpg", etc.). However, be aware of any copyrighted material.
|
|
|
|
|
Hey folks,
Any recommendations for a Csharp editor (with code completion)?
Has to be lightweight - Sharpdevelop is a bit heavy for my laptop.
Thanks,
Davy
My Personal Blog - Homepage
|
|
|
|
|
Borlan used to have one... take a look at www.borland.com
Free your mind...
|
|
|
|
|
|
Thanks - IDE looks pretty cool. Its a bit like DrPython
Davy
My Personal Blog - Homepage
|
|
|
|
|
this is what i need to do:
user enters a date in the DateTimePicker.
the code needs to validate the date agains a few criterias.
if it does not pass the validation. display a message asking if the user really wants that date.
if the user wants to continue with the date, just go ahead.
if not the date should go back to what it was.
I am having the hardest time to get the program to flow thist way.
I tried to extend the datetimepicker to add a onchanging event, i tried the validating event. But so far there is always one thing in this flow that does not work.
Can any one help!
thank you
tephra
|
|
|
|
|
Use the TextChanged event
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
simply use the validating event
with this event you can cancel the leave event via eventarg
|
|
|
|
|
The problem with the validating event is the messagebox. the messagebox kicks the "valuechanged" event. even if i disable the event before the messagebox, the value already changed and the event is not kicked afterwards when i want to. also there is the path that does not go through the messagebox(when the date is valid). and so on...
I keep getting caught on something.
it would be simpler if i could get the messagebox to stop changing the value of the datetimepicker before the validating is finished.
thank you
|
|
|
|
|
...another problem is that the validationEvent is not trigged when I choose a date in the calendar.
|
|
|
|
|
Hello there!
I am currently writing a chat-program. All of the network functions are (almost) working properly. But i have one problem though. I want the richTextBox to autoscroll when the text goes behind the border of the control (like Windows Messenger)
I hope that you can help me with this!
Regards
|
|
|
|
|
richTextBox1.Focus();
richTextBox1.SelectionStart=richTextBox1.TextLength;
richTextBox1.ScrollToCaret();
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
Thanks a lot!!
I tried something similar, but it didn't work..
Thanks Again!
Regards
|
|
|
|