File/Open?? Just opening the solution or porject file should launch the conversion wizard which will upgrade the project files to the current version supported by the IDE, IF the conversion is supported.
You can't change the key of a node in a hash table, as the entire table is arranged according to the hash codes of the keys. You have to remove the node from the table and re-add the object in the node using the new key.
Once a hashtable record is created, you don't want to change the key. Changing the value is fine though. Sometimes whan I need a quick and easy list of objects, I'll create a hashtable and just use hash.count as the key. Here is an example of how you could deal with changing values from a hashtable:
Hashtable hash = new Hashtable() ;
for (int i = 0; i <=10; i++)
//we now have 11 objects in the hashtable
int counter = 0 ;
//we do this, because hashtables don't guarantee that you'll
//get object out in the same order you put them in
for (int i = 0; i <= 10; i ++)
hash[i] = "new object" ;
//this will modify the VALUE, not the KEY
//if you don't care about the order you're getting objects out of the hashtable
//you can enumerate them like this:
IDictionaryEnumerator enumr = hash.GetEnumerator() ;
object theKey = enumr.Key ;
object theValue = enumr.Value ;
//you could change the value here
enumr.Value = "new value" ;
Just as some further info: Whenever you loop over some sort of collection with foreach you are not allowed to change it within the loop. That's no speciality of the HashTable class but affects about all collection classes.
I encode picture by binary byte and put it into database,now i want to get it back and put it into Grid(i use Xtragrid). I decoded it into Picture, but i dont know how to show it into grid
Please help me
Thanhs a lot.
Sure, Win32_Directory[^]. But why would you want to??? This is kind of the Rube Goldberg method of copying files. It has limited functionality, such as it won't over-write the destination file if it already exists.
Does anyone know of any way of calling functions in a VB6 exe, from code in C#? Is this even possble? I don't know much (if anything!) about VB6 so I'm a bit confused. I've managed to call functions in a VB6 dll, but is the same thing possible with exe's too?
As always, any help at all would be greatly appreciated!
Nope. VB6 .EXE's don't support export functions, so you there's really nothing to call. .DLL's on the other hand, you've already found out.
The only exception to this would be if the VB6 .EXE is an ActiveX Server, which has all kinds of exports, just like any other COM-based assembly. Just add a COM reference to your .EXE and you're just about all set.
Hi all, I'm using component WebBrowser in my Windows Forms application (Framework 2.0), thus I need to block WebBrowser shortcuts (such as F5).
When I set WebBrowserShortcutsEnabled property to false, all shortcuts are blocked, but also it blockes "Delete" key.
Is there simple way to block "F5" without blocking "Delete"?