controls in runtime

i have a textbox array using that i create 20 text boxes in runtime, i need to get the focus if a particular text box(if i press downarrow in keyboard how to get the key down of a particular text box it can be 3rd text box).


You can add an Event-Handler to your KeyDown-Event:

yourTextboxArray[x].KeyDown += new KeyDownEventHandler(yourMethodHere);

The event has two parameters, sender (Object) and e (KeyDownEventArgs). You can use the sender to determine what Textbox has send the KeyDown.

Textbox txb_sender = sender as Textbox;
if(txb_sender != null)
      // do something here with it

Need Your Help

Genetic algorithm resource

algorithm resources genetic-algorithm

Lately I'm interested in the topic of genetic algorithms, but I couldn't find any good resource. If you know any good resource, book or a site I would appreciate it. I have solid knowledge of algor...

Incompatible modes for port vhdl

mips vhdl

I am getting the following error with my code: ** Failure: (vsim-3808) Incompatible modes for port "d_out".