Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リッチテキストボックスを使用していて、ユーザーがマウスで強調表示するテキストを取得したいと考えています。これを行うVB.netのイベントハンドラーはありますか?
RichTextBox.SelectionChanged イベントです。
次のように使用できます。
Private Sub r1_SelectionChanged(sender As System.Object, e As System.EventArgs) Handles r1.SelectionChanged Me.Text = r1.SelectedText End Sub