Solved

How Do You Display Messages on Mutliple Lines on a Visual Basic Control?

Posted on 2013-12-12
4
261 Views
Last Modified: 2013-12-16
I have a validation message that I am trying to display in a Visual Basic label.  The message has multiple lines.

Code:
"test1" & Environment.NewLine & "test2" & vbCrLf & "test3"

When I try to display the message all of the text is on 1 line instead of 2.

How do I display multi-lines?

Thanks,

Dan
0
Comment
Question by:danielolorenz
4 Comments
 
LVL 19

Assisted Solution

by:Rikin Shah
Rikin Shah earned 166 total points
ID: 39714153
Hi,

Try below code-
"test1" & "<br />" & "test2" & "<br />" & "test3"
0
 

Author Comment

by:danielolorenz
ID: 39714162
It worked.

Thanks
0
 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 167 total points
ID: 39714164
Designer
and
Code with result
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 167 total points
ID: 39714404
It's not apparent in AndyAinscow's screenshot, but make sure you set the AutoSize property of the Label to False in order to be able to resize it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now