Am working on converting my VB6 mid() functions to .net .substring.
I cannot figure out this part of it.
Here's my VB6 code:
My new .Net is like this:Code:txtInput.Text =Left(txtInput.Text, txtInput.SelStart) & strtext & Mid(txtInput.Text, txtInput.SelStart + 1)
Where the ??? are in the .net code I don't know what to put there.Code:Dim Y As String Y = txtInput.Text strtext = TypedLetter.Text 'TypedLetter is the sender button. txtInput.Text = Y.Substring(0, txtInput.SelectionStart) & strtext & Y.Substring(txtInput.SelectionStart + 1, ???)
I want it to pick up characters from "txtInput.SelectionStart + 1" to the end of the character string that is inside txtInput textbox.
"txtInput.SelectionStart + 1" is the cursor position after strtext is entered into txtInput.Text
Can someone please help on this. I feel like it should be an easy answer!!
I tried using something like:




Reply With Quote