Create a new project. On this project put one TextBox and a Button. For the TextBox wire-up a KeyPress event. For the Button wire-up a Click event.
Here's what the code should look like:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string s = "TextBox1 Text = " + textBox1.Text;
MessageBox.Show(s);
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
}
}
Set the Speicifc Page to Form1.wgx, save, build, run.
Now, do the following:
1. Type "abc" (no quotes) followed by typing Enter. So, four keystrokes. Then, follow that by clicking the button, you will see this:
TextBox1 Text =
Notice that the Text is blank. It should say abc.
2. Click OK on the MessageBox, focus into the TextBox, append "de" to "abc" (again, no quotes). This time don't press Enter. Follow that by clicking the button, you will see this:
TextBox1 Text = abcde
OK. Good. But,
3. Click OK on the MessageBox, focus into the TextBox, append "fg" to "abcde" (agin, no quotes). This time press Enter. Follow that by clicking the button, you will see this:
TextBox1 Text = abcde
In other words, if you press Enter, you see what was there before you started typing.
I just upgraded to 6.4d and we have a log-in page to the app. Our textboxes (username and password) have the "EnterKeyDown" event wired-up. I went to log-in how I normally do, type username, tab, type password, enter.
1. The EnterKeyDown event did not fire. This may be another bug.
2. I moved my mouse cursor to the log-in button, clicked it, my log-in failed. This is because I pressed enter while in the Password TextBox, so it thought I entered a password of *blank* (no text).
6.4d has just ruined my log-in page! Please help.
EDIT: And think about all my dialogs, with all the different textboxes I use throughout. This is a major issue I think.