Where is "ENTER"?

Started by
7 comments, last by medovids 22 years, 4 months ago
can somebody help me? I need to make a string in Visual Basic and it has to have multiple lines. Instead of the string saying "hello how are you" I want it to say "Hello how are you" How do I do this?
Advertisement
I never did any VB programming, but if it''s like C (among other languages) use ''\n'' for an endline character.

[Resist Windows XP''s Invasive Production Activation Technology!]
you would insert vbCrLf where you want the line return:

str = "Hello" & vbCrLf & "how" & vbCrLf & "are" & "you"
Thanks!
Is there any way to also right align the text?
Set the Align property of the control to rihgt. I don''t remember the actual numeric value, but it should show up in the drop down for the align property in the property viewer.
How about in an MsgBox where there is no properties, Is right aligning text possible to do?
I haven''t done any VB programming, but the I would imagine it''s similar to the way it''s done in C. The MessageBox function has four parameters, the fourth specifying the type of message box through flags. One of the flags is MB_RIGHT, which should right-align your text.

So it should be something like:
  MessageBox (......, MB_RIGHT or MB_ICONQUESTION)  


Kippesoep
VB message box''s use a custom enumeration that is nearly analogous to the MB_STYLE flags. I personally prefer to use the straight API methods (Declare Function etc.). I like to reference API functions for everything, cause it kind of helps VB''s extremely painfully slow operation speed.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement