2009-08-20 132 views
0

是否可以在vb.net的msgbox中居中文本? (類似於<中心>在HTML)是否可以在msgbox中居中文本?

這不是中心本身:

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") 

它沒有中心沒有換行之一:

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") 
+4

您確定在嘗試閱讀消息對話框中的所有內容後用戶的眼睛會放鬆嗎? – redsquare 2009-08-20 22:41:03

回答

2

不,你不能。

你可以做的最好的是滾動你自己的MessageBox窗體,或者用間距來僞造它。

2

你必須創建自己的形式,看起來像一個消息箱,在那裏你可以居中文本,然後打開它從一個自定義函數(你可以調用與使用MsgBox幾乎相同的方式)

+0

我記得有一次,當編程一個VB6應用程序時,默認的msgbox用於崩潰我的應用程序,然後我創建自己的msgbox並且一切正常。 – 2009-08-20 22:53:29

相關問題