Since I had CurrencyManager in BindingContext, your suggested solution resulted in CurrencyManager position not changing when user right-clicked the grid so I had to google again, this time with more words in the issue to succeed.
Here's the solution:
Using DataGridViewCellMouseEventArgs e I can change current row by setting CurrentCell property:
hi. I coded a multi threaded TCP Server (using .net 2.0)
and also I coded a client side program.Client side programs are executing on Mobile Devices
When the client number is six or seven a serious problem occurs , The problem is even if a mobile device send a message to server properly (Socket.Send is succesful and then start waiting for the response ) but often the response message does not arrive to client side.I think this is so weird
Is there a concurrent use of server side network i/o or something and needed to thread synchronization
to send data to clients or this is all about wireless network performance
It is likely a design issue. Multithreaded programming is an Advanced concept (to do correctly) and sockets programming is up there as well. (Compared to ASP.NET) If you have a TCP/IP socket you are guaranteed to be able to get data in order or get an exception (or socket closed).
but I look at a lot of sample code of multi threaded server applications.I can not find major diffirences to cause this kind of problem.Just I can see about that I don't use asynchronous functions for example networkstream.BeginWrite.
is that ok the concurrent (from all running threads) use of networkstream.Write function
may be somehow some Write functions fails according to concurrent use I don't know really.
my server code look like this sample code(Concurrent Server Application Example) its url
I am not sure it is crap or something else but I can not find any better sample .
But I want to repeat my main problem is clients sometimes does not get response messages from server even if at the first it can send messages server properly
any idea..? thanks a lot
Back in 1999 I spent 3 days with a packet sniffer to debug a client server application I wrote in C++. How long have you spent analyzing the raw network traffic and your code?
The code is hard to write and isn't usually a one line fix or an, oh you missed this. And like I said previously, all samples on the web derive from the MS sample which is crap including the link you provided which you would have known had you bothered to look at the MS sample.
There is nothing weird about it. Most people will have difficulty properly coding a multithreaded socket server even if they have vast experience doing it. If you are a novice then this is completely normal.
The thing that is actually weird is how many novices believe it will be simple to do it.
That is usually how I insert into SQL. The CSV data can be split using the string.split method and if you parametrize the queries you will avoid SQL injection but still be susceptible to spammers so you will need to HTML encode any input.
Dunno, depends on how the information is presented on the page. One such page I scrape for data has the data I want in a table. The code I use to get the page is:
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest) System.Net.HttpWebRequest.Create ( theurl ) ;
req.CachePolicy = new System.Net.Cache.RequestCachePolicy ( System.Net.Cache.RequestCacheLevel.NoCacheNoStore ) ;
using ( System.Net.HttpWebResponse rsp = (System.Net.HttpWebResponse) req.GetResponse() )
string res = ( new System.IO.StreamReader ( rsp.GetResponseStream() ) ).ReadToEnd() ;
// Then I use a Regular Expression to extract what I want// and insert it to the database.
I make no claims that this technique is "good", only that it does what I want for a rather unimportant Windows Service.
As mentioned, the data I scrape is in a table, so the page contains:
<td width="473"class="playlist">4:08 pm - The Beatles - Can't Buy Me Love<br>4:10 pm - The Doors - Break On Through<br>4:13 pm - Meat Loaf - Paradise By the Dashboard Light<br>4:21 pm - Klaatu - Mister Manson<br>4:25 pm - Bob Seger & The Silver Bullet Band - Long Twin Silver Line<br>4:29 pm - Eagles - Those Shoes<br></td>
and I use a Regular Expression to match <td width="473" class="playlist"> the data I want <br></td>;
Then I split further on <br> and hyphen.
You will need to find such a pattern in the page you're reading.
Last Visit: 31-Dec-99 19:00 Last Update: 29-Nov-22 4:55