Question:
HELP! Visual Basic 6 with Message Box?
danpakz
2007-09-14 08:57:44 UTC
how to output multiple line in a message box?

example output:

name: danpakz
age: 12
school: xu

[ok] [cancel]

what's the code?
Four answers:
rooftop
2007-09-14 15:20:18 UTC
Use this code:



msgbox "name: danpakz" & vbcrlf & "age: 12" & vbcrlf & "school: xu"



Regards
anonymous
2007-09-14 09:08:46 UTC
I'm pretty sure you can use a character code to include a carriage return between each portion. In VBA, it is something like chr(13). I am thinking it is similar in VB6 - check it out.
?
2016-05-19 08:14:22 UTC
2 ways to do this:- - Go into your project properties from the VB main menu and change your project name (this is probably a good idea anyway) - pass more parameters to the msgbox command, you can set most things on it - see the VB help for the exact parameter list.
anonymous
2007-09-14 10:42:42 UTC
System.Environment

System.Windows.Forms.ToolTip



Me.ToolTipProviderCtl.SetToolTip(Me.Button1, "this is" & environment.NewLine & _ "a multiline" & environment.NewLine & "tooltip!")


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...