I just implemented a simple form with a scrollable multi-line TextBox when I needed something similar to show the long status reports or exceptions detected by the application. You can change the borders, etc., to make it look like a shortcut if you want. Then just a new one and call its ShowDialog method or complete its creation in some static element like a MessageBox. As far as I know, the .NET team has not built anything more flexible than MessageBox.
EDIT FROM COMMENTS:
The code for creating a window with a text box that can be displayed using the static method is pretty simple. Although I generally donโt like explicit requests for code, I will definitely be this time:
public class SimpleReportViewer : Form {
Using:
var message = GetSomeRidiculouslyLongMessage(); //assumes it called from inside another Form SimpleReportViewer.ShowDialog(message, "My Message", this);
This particular implementation also supports displaying as a normal, non-dialog box using Show () method overloads.
KeithS Jan 13 '11 at 16:56 2011-01-13 16:56
source share