How to enter new text into text already in textbox

0

I am trying to introduce in the first line of a text already imported in the textbox the date and time, but when I apply with this code it does a new line but in the end and I need to apply in the first line. This is my current code

TextBox1.Text &= Environment.NewLine & time.ToString(format)
    
asked by anonymous 26.10.2018 / 10:32

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 is my current code

TextBox1.Text = TextBox1.Text.Insert(0, time.ToString(format) + vbNewLine)
    
26.10.2018 / 10:40