[Webinar] Streamline your web hosting managementRegister Today


C# Message Box Text

Posted on 2006-04-03
Medium Priority
Last Modified: 2012-05-05
I'm presenting the user with a Message Box in C#, I have a lot of text to add, how do I get that text to wrap, skip a line, and indent?
Question by:tsmolskow
LVL 52

Expert Comment

by:Carl Tawn
ID: 16362113
You can put line breaks in by using the "\n" escape sequence. Wrapping is automatic unless you force it by using \n. Not sure if you can indent text or not.
LVL 18

Accepted Solution

Ravi Singh earned 2000 total points
ID: 16362159
Hi, use the new line and tab escape characters in your message string, e.g:

      string message = "Hello\nWorld\t!!!";

"\n" is a new line
"\t" is a tab (use for indent)

For a list of the supported escape characters see:
LVL 48

Expert Comment

ID: 16362244

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question