Solved

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

Posted on 2013-12-12
4
273 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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