D
D
Dmitry2015-06-07 23:13:17
.NET
Dmitry, 2015-06-07 23:13:17

How to implement buffered output in Windows Forms?

When writing an application using Windows Forms, it was necessary to implement the output of the application log similar to the console one. Initially, a RichTextBox was installed and information was dumped there, but the problem is that the output is extremely extensive and reaches very large volumes in a short time.
Apparently, due to the static nature of lines in .NET, the application dies instantly, since the runtime is only concerned with recreating huge lines in the RichTextBox (which, even if it worked correctly, would be irrational, since 40- 50 character lines).
The question arises, how to implement console-like output on Windows Forms (without recreating one big line) elements? Perhaps you can somehow insert directly the console inside the form?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sumor, 2015-06-07
@Sumor

Discover Debug and Trace
When loading an application, you can attach your thread to Listeners, and then read the log delta on a timer.
Debug methods work in the debugger version, Trace methods work in both debug and release.

A
Andrey Lastochkin, 2015-06-08
@lasalas

Use ListBox or ListView.

D
Denis, 2015-06-08
@den_labs

Yes, look towards the ListView, with VirtualMode = true.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question