I have a form that has many text boxes on it. When the user selects a record to work with I load all the text boxes with the approiate data. I want to be able to determine if the user changed any of the content in any of the text boxes?
I have looked at the text change event, but won't this event fire when I load the text boxes from the db?
If any body has any suggestions or sample code for doing this it would be appreciated!
Two quick solutions.
0: Unsubscribe to the TextChanged events immediately prior to loading from the Database and add the subscribers again afterwards.
1. Use a boolean flag field that you set to true when loading and set to false afterwards. Check this flag in the TextChanged event handling method(s) and just return immediately if true.
Dave BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
I don't think that's possible without Reflection. The overhead would only really be noticed if you loop several hundred times anyway, so there really isn't any need to worry if you're just putting together a small application
Thanks for the reply, i just want to confirm that there is no other way without reflection and am not missing any good logic. This bit which i am talking about is used in my serialize and deserialize process. Even there are few members (about 50), its going to be executed many times (every time i send a query across wire). Even MS logic for finding the serializable members and serializing uses reflection (hope i am not wrong).
If you are looking for a faster way and less space, serialize the bytes your self using BitConverter class (static methods). The downside is that you need to hand code all of this unless you build a little SW that will do it for you.
I have build C# DLL with few function and Registered it successfully
So far All is good.
Last time I did anything like this I had to create an NDIS driver and capture the traffic at the network card. This is not for the faint of heart and if you mess it up you are likely to pull down the entire operating system.
I have used multithreading for udp client/server communication.When i run the server both the threads are executing at the same time.So i used a Thread.Sleep() after the 1st thread.So the 1st thread works properly.When it comes to the 2nd thread it gives"the existing connection was forcibly closed by the remote host".Can you please give me your suggestion