buddyB
Member
Hi,
im writing a program (in vb.net) which keeps a logfile. This logfile is shown in a Richtextbox. In the richtextbox i want to see the last event(logging) on the first line,then newest data first.
Ive tried it with SelectionStart and SelectionLength but it wouldnt work. Actually it is easier for me (my program) if i could write a new event on the first line in the logfile instead of the last line.So in stead of the normal writing 1 then 2 then 3 :
1
2
3
i want to this, write 1 then go up a line and write 2, go up again en write 3:
3
2
1
a piece of my program:
If File.Exists(FilePath & "LogFile" & DateString & ".bms")
FileOpen(2, FilePath & "LogFile" & DateLog & ".bms",OpenMode.Append)
Open LogFile-file
??????? Goto the first line in the logfile????????
WriteLine(2, PandNaam & " " & LogString) write data in the Logfile
FileClose(2) Close the logfile
Else : MsgBox("Cant find LogFile" & DateLog & ".bms.")
End If
Cheers ,
BuddyB
im writing a program (in vb.net) which keeps a logfile. This logfile is shown in a Richtextbox. In the richtextbox i want to see the last event(logging) on the first line,then newest data first.
Ive tried it with SelectionStart and SelectionLength but it wouldnt work. Actually it is easier for me (my program) if i could write a new event on the first line in the logfile instead of the last line.So in stead of the normal writing 1 then 2 then 3 :
1
2
3
i want to this, write 1 then go up a line and write 2, go up again en write 3:
3
2
1
a piece of my program:
If File.Exists(FilePath & "LogFile" & DateString & ".bms")
FileOpen(2, FilePath & "LogFile" & DateLog & ".bms",OpenMode.Append)
Open LogFile-file
??????? Goto the first line in the logfile????????
WriteLine(2, PandNaam & " " & LogString) write data in the Logfile
FileClose(2) Close the logfile
Else : MsgBox("Cant find LogFile" & DateLog & ".bms.")
End If
Cheers ,
BuddyB