これまでのところ、ユーザーが何かを入力すると、ラベル プロパティに格納されます。私はこれが正しくないことを知っています。ユーザー入力に基づいて変数を更新し、それを使用する必要があるイベントで使用するにはどうすればよいですか?
これは、私が試した多くのことの 1 つです。私がしなければならないことの解決策をグーグルで検索するための正しい検索用語を理解することさえできません。
namespace Words
{
  public partial class formWords : Form
  {
    int x = 5;
    int y = 50;
    int buttonWidth = 120;
    int buttonHeight = 40;
    string fileList = "";
    string word = "";
    string wordFolderPath = @"C:\words\";// this is the variable I want to change with the dialog box below.
  private void selectWordFolderToolStripMenuItem_Click(object sender, EventArgs e)
    {
        FolderBrowserDialog folder = new FolderBrowserDialog();
        if (folder.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {
            string folderPath = folder.SelectedPath;
            formWords.wordFolderPath = folderPath;
        }
    }