views:

227

answers:

2

is it possible to center text in a msgbox in vb.net? (similar to the < center> in html)

this is not centering itself:

MsgBox("Thank you for using Eyes At Ease" & Chr(153) & vbCrLf & _
               "You can always access this screen by clicking on the icon in your taskbar" & vbCrLf & _
               "To adjust the Hue and Saturation of the screen, please drag the bars" & vbCrLf & _
               "You can also choose any color by clicking on CHOOSE and selecting a color" & vbCrLf & _
               "If you like the color you are currently use it and want to save it, you can click on ADD COLOR" & vbCrLf & _
               "The program will automatically start with the last colored you used", , "Eyes At Ease")

it's not centering without line breaks either:

MsgBox("Thank you for using Eyes At Ease" & Chr(153) & _
               "You can always access this screen by clicking on the icon in your taskbar" & _
               "To adjust the Hue and Saturation of the screen, please drag the bars" & _
               "You can also choose any color by clicking on CHOOSE and selecting a color" & _
               "If you like the color you are currently use it and want to save it, you can click on ADD COLOR" & _
               "The program will automatically start with the last colored you used", , "Eyes At Ease")
+1  A: 

You'd have to create your own form that looks like a messagebox, where you can centre text, then open it from a custom function (which you could then call in much the same way as using the MsgBox)

Peymankh
I remember once, when programming a VB6 app, the default msgbox used to crash my app, then I make my own msgbox and everything went ok.
yelinna
+1  A: 

No, you can't.

The best you can do is roll your own MessageBox form, or fake it with spacing.

Chris Dwyer