私は新しいです、私はここで例を見つけましたが、私にとってはうまく動作しません。テキストを書き込んだ後にEnterキーを押してプログラムを実行し、書き込みを削除します
私はちょうど私のプログラムを第2の方法で実行しようとしていますが、理解する方法はわかりません。
:私は、textBox1テキストボックス内のいくつかのフレーズを書きたいは、その後、入力textBox1テキストボックスから書かれたフレーズを削除し、いくつかの計算を行うだけにして、私はこの道を行けばTextBox2を
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace XX_TEXTBOX_TEST
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
textBox2.AppendText("OK!");
}
}
}
でこのテキストを表示するにヒット
`Severity Code Description Project File Line Suppression State Error CS1061 'Form1' does not contain a definition for 'textBox1_TextChanged' and no extension method 'textBox1_TextChanged' accepting a first argument of type 'Form1' could be found (are you missing a using directive or an assembly reference?) XX_TEXTBOX_TEST C:\FOLDER\Form1.Designer.cs 42 Active
そして:
私はエラーを得ました3210
Severity Code Description Project File Line Suppression State Message The designer cannot process unknown name 'textBox1_TextChanged' at line 42. The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again. C:\FOLDER\Form1.Designer.cs 43
'テキストが変更されたときにTextChanged'が唯一のトリガーです。 keydownイベント –