hi :wave: every one
i need to know how to instert a text in the position of the cursor (not the mouse cursor (the blicking one that appears when we type))
Printable View
hi :wave: every one
i need to know how to instert a text in the position of the cursor (not the mouse cursor (the blicking one that appears when we type))
I assume that you mean in a TextBox, and what you're talking about is called the "caret". To insert text at the caret position in a TextBox or RichTextBox you simply set the SelectedText property. If text is selected it will be replaced. If no text is selected then the new text is simply inserted.
And if you don't wont text to be replaced if highlighted putbefore setting the "SelectedText" valueVB Code:
TextBox1.SelectionLength = 0
ohhh ! thx
I never thought it would be that easy
thx for the infoQuote:
you're talking about is called the "caret"