Archived

This topic is now archived and is closed to further replies.

Where is "ENTER"?

This topic is 5815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you would insert vbCrLf where you want the line return:

str = "Hello" & vbCrLf & "how" & vbCrLf & "are" & "you"

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites