How to insert new text into existing text in textbox

Asked

Viewed 20 times

0

I’m trying to get in the first line of an already imported text in the textbox the date and time , but when I apply with this code it makes a new line but at the end and I need to apply in the first line. this and my current code

TextBox1.Text &= Environment.NewLine & time.ToString(format)

1 answer

0

Well I ended up finding a solution to the problem that was intended for richtextbox and made some changes to work with textbox. Code found here Stackoverflow

this and my current code

TextBox1.Text = TextBox1.Text.Insert(0, time.ToString(format) + vbNewLine)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.