Hello, just wondering if there is another event i can use for when you are done writing to the textbox
the normal textchanged event goes in play everytime you change a letter.
i need the event to go in play when im done writing and for example start writing in the next one?
is there an event that knows where my textmarker is?
You could use one of the Key events, and perhaps do something like this:
private void textBox1_TextChanged(object sender, EventArgs e)
//Your stuff here
private void textBox1_KeyUp(object sender, KeyEventArgs e)
if (e.KeyCode == Keys.Enter)
// if it is the enter key, select the next textbox
I guess something like that will work but it will require the enter press :/ so then I have to explain that to new users and stuff that they have to press it before going on to next.
I'll be a little cautious and wait and search some more :) but it is certainly an solution
There's also the Leave event; it's fired when the TextBox loses focus. Just keep in mind, that if you have an AcceptButton set and the user presses <Enter>, the Button.Click event will fire, but the Leave event will not (since it never really loses focus).
You may want to even look at the validation logic that WinForms supports. You can individually validate each control in the Leave event, and also call ValidateChildren on the Form to validate all controls in the Button.Click event. Not sure if this applies in your situation, but just an idea.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.