473,386 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Messagebox (NewLine)

Is there a way to put some of the text typed into a messagebox string on
a new line? This is for user readability only.

Thanks
Tom

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
3 2131
Thomas Beyerlein wrote:
Is there a way to put some of the text typed into a messagebox string on
a new line? This is for user readability only.

Thanks
Tom

*** Sent via Developersdex http://www.developersdex.com ***


I think this is what you want:

MessageBox.Show("Line 1" & vbcrlf & vbcrlf & "Line 2")

It might be VbCr instead of VbCrLf

Enjoy
Chris
Nov 21 '05 #2
"Thomas Beyerlein" <tb***@yahoo.com> schrieb:
Is there a way to put some of the text typed into a messagebox string on
a new line? This is for user readability only.

\\\
MsgBox("Hello" & ControlChars.NewLine & "World!")
///

Alternatively you can use 'vbNewLine', 'Environment.NewLine', 'vbCrLf', ...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3
These other examples work, I have found though recently the stringbuilder
class. It works verywell for this, and allows for alot more customization
and control on the text formatting.

dim message as stringbuilder

message.appendformat("Hello {0}!",username)
message.append(environment.newline)
message.appendformat("{0}, what are you doing {0}?",username)
message.append(environment.newline)
message.appendformat("{0}, I will kill you {0}!",username)

messagebox.show(message.tostring,"HAL9000")
--
--Eric Cathell, MCSA
"Thomas Beyerlein" <tb***@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Is there a way to put some of the text typed into a messagebox string on
a new line? This is for user readability only.

Thanks
Tom

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Alan Mackenzie | last post by:
To all those who use (X)Emacs's CC Mode to edit C, C++, Java, Objective-C, Pike, AWK or IDL: To help direct the development of CC Mode, it would be useful to find out how people use the...
1
by: kannan | last post by:
hi, It might be the simple question. I am concatinating two string and displaying in messagebox. Ex: MessageBox.show(string.Concat("The following validation(s) failed:\n", arg.DisplayMessage))...
29
by: runningdog | last post by:
Hi, I would like to be able to embed a newline in a text string. Is there any convienent notation to do this TIA Steve
2
by: amruta | last post by:
How can I write a multiline text in a message box.show how can i use the line feed or carriage return in this situaion. Thank you
4
by: Peter Kirk | last post by:
Hi I would like to ask a little bit about the value Environment.Newline: what is it and what is the point of it? Ok, I can see in the docs that it represents "newline" for the current platform -...
5
by: Adam Right | last post by:
Hi, Is there a way to construct the mail body including newline characters by using .net framework mailing functions when sending an email? I cannot insert newline character into the body of the...
3
by: Alan T | last post by:
How do I display 2 lines in the message box? eg Click Yes to continue. Click No to stop.
11
by: rossum | last post by:
I want to declare a const multi-line string inside a method, and I am having some problems using Environment.NewLine. I started out with: class foo { public void PrintStuff() { const...
1
by: linq936 | last post by:
Hi, I read in many places that the string to be outputted by printf() must be ending with newline, for example, it should be printf("Hello World.\n"); instead of printf("Hello World.");
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.