Where is "ENTER"?
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?
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!]
[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"
str = "Hello" & vbCrLf & "how" & vbCrLf & "are" & "you"
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.
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:
So it should be something like:
MessageBox (......, MB_RIGHT or MB_ICONQUESTION)
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.
-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement