Friday

HOW TO CAPTURE ENTER (Return) KEY PRESS EVENT ON TEXTBOX AND INVOKE OTHER EVENTS.....

C# Code....

//first handle KeyDown Event for control on which you want to capture Enter key as follow..

private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Enter)
{
//MessageBox.Show("Enter key pressed...");
Invoke(new System.EventHandler(button1_Click)); // Invoking other event handler...
}
}


// Other event which will be indirectly invoked when enter key pressed on TextBox...

private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Button Clicked");
}




Wednesday

.NET Online Help....

You are most welcome to my online tech support Blog, You will get the latest posts on .NET technology here.

You can Post your problems here as comment.
You will get Free solution & suggestions from field experts...