私はRichtextBox
、Menustrip
およびその他の多くのコントロールを使用する Windows フォーム アプリケーションに取り組んでいます。
私はいくつかの作業を行いましたが、それを機能させることができません。マウス カーソルが RichTextBox 内を移動すると、簡単なメモ帳のように、位置を自動的に変更したいと考えています。
私のビットコーディングは....
マウスカーソルが動くとステータスバーの動的位置が変わるようにしたい
private void sizeToolStripMenuItem_Click(object sender, EventArgs e)
{
int line = richTextBox1.GetLineFromCharIndex(richTextBox1.SelectionStart);
int column = richTextBox1.SelectionStart - richTextBox1.GetFirstCharIndexFromLine(line);
toolStripStatusLabel5.Text ="Line"+" "+ line.ToString();
toolStripStatusLabel6.Text = " Column" + " " + line.ToString();
toolStripStatusLabel3.Text= Cursor.Position.ToString(); // where is my mouse cursor at this Time like that x and y cordinate 330,334
}