Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 285
  • Last Modified:

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

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
danielolorenz
Asked:
danielolorenz
3 Solutions
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Hi,

Try below code-
"test1" & "<br />" & "test2" & "<br />" & "test3"
0
 
danielolorenzAuthor Commented:
It worked.

Thanks
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Designer
and
Code with result
0
 
käµfm³d 👽Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now