How to paste text in textbox current cursor?

前端 未结 9 800
灰色年华
灰色年华 2020-12-30 19:23

How do you paste text into a TextBox at the current cursor position in Windows Forms?

Not textbox1 += string

9条回答
  •  囚心锁ツ
    2020-12-30 19:34

    A much easier way would be to use the Paste method:

      textbox1.Paste("text to insert");
    

    I've done this using .NET 4.0

提交回复
热议问题