Well it means that when there are all the items in the checkedlistbox selected and i press the delete button they get deleted from the checkedlistbox but not from the registry...i cand only delete values from the registry one at a time and only when there are more than 2 entries..
If you had stepped over your code, you would have seen what the problem is. Basically, you're iterating over one list of values, and you're getting one single value from the other list to compare it to. Try iterating over the selected items from the list box as well, and do your comparison in there.
Now, a more important point is that your comparison code is using terrible variable names. I ended up getting confused by your t and v variables.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
I am trying to trite a small app that acceses internet browser history on IExplorer using its registry. Somehow i cannot delete the URLs that have been viewed.
note: After accesing the registry i store the data in a checkedlistbox. Any help?
privatevoid Delete_Click(object sender, EventArgs e)
RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\TypedURLs", true);
string v = key.GetValueNames();
string t = new string[v.Length];
int count = checkedListBox1.Items.Count;
for (int i = 0; i < v.Length - 1; i--)
t[i] = (string)key.GetValue(v[i]);
if(t[i] == (string)checkedListBox1.SelectedItem)
for ( int i = count; i >0; i--)
if (checkedListBox1.CheckedItems.Contains(checkedListBox1.Items[i - 1]))
checkedListBox1.Items.RemoveAt(i - 1);
i am building an online based Examination project using asp.net, when the student click an option the option should be stored into database, and if the student which to edit the answer, he or she should be able to do click previous button and edit it.
Is there a way to tell the binary reader how many characters to read because i need the code to read certain amount of bytes in every row of the code and this code i want to read the first row i need to read only 10 Bytes and not the whole row
this is a part of the code that reads from the file
string emriK = brHuazimet.ReadString();
now i know how to write this string into the file i am going to write after reading this part but when i try to read it reads to much from the code
hi guys . i have many client that are connected to the server .
i can connect to the server completely with out any wrong in my code from my clients .
and the server response the client pretty fine .
okay , what do i need to do , is that if one client send some data to the server , i need the server to response to all the clients . like
My advice is the same as I offer in response to most socket-related programming questions: don't roll your own, there's no point. Socket code is hard to write well and even harder to test thoroughly.
Instead, spend a bit of time getting your head around ZeroMQ[^]. Trust me, it will be time well spent. What you are trying to do is easily achieved with ZeroMQ. Look at the dealer-router & publish-subscribe patterns. I think this is the sort of thing you're after (taken from the ZeroMQ Guide) :-
Nope, not personally, though many people have. We use it to pass messages between sites on our EPOS systems, but it's low-volume stuff.
ZeroMQ is very fast. Here[^] are the official performance tests on the ZeroMQ site, and this[^] is a performance comparison between RabbitMQ, ZeroMQ and QPid on Apache. ZeroMQ was over 60 times faster than RabbitMQ and 250 times faster than Qpid. Note, however, that these tests were a C++ application. Putting a C# wrapper around ZeroMQ slows it down somewhat, but makes it *so* easy to use
UPDATE: The RabbitMQ/ZeroMQ/Qpid test in the link above may not have been fair - see the comments regarding whether message persistence was enabled. Final opinion seems to be use ZeroMQ for socket comms but if you need an MSMQ-type message queue with message persistence use an AMQP app like RabbitMQ...
Last Visit: 31-Dec-99 18:00 Last Update: 23-Jun-17 13:37