将TEXTBOX的Multiline属性设成true,然后将要显示的文本中的每个字符用chr(13)
+chr(10)分开,且将数值赋予text属性.

解决方案 »

  1.   

    我记得TEXTBOX属性里有一个设置可以改变文本的横竖显示!但6.0里却没有!
      

  2.   

    会不会使用Api函数呢?如果会的话你想怎样将文本放置都行,不过这种方式用户将不能编辑文本,只能看不能动,如果能用的话去查api函数TextOut,DrawText,DrawTextEx的用法吧!
      

  3.   

    你是要可编辑的还是只是显示而已的?要竖排而且可编辑可以用lp23的方法,加入回车换行,如果只是显示竖排的文字,可以使用Label或者用API--TextOut(), DrawText()...
    或者Print方法;TextOut()举例如下:
    'This Project needs
    '- two timers, interval=100
    '- a button'in general section
    Private Type POINTAPI
        x As Long
        y As Long
    End TypePrivate Declare Function GetActiveWindow Lib "user32" () As Long
    Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As LongPrivate Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    Private Sub Form_Load()
        Timer1.Interval = 100
        Timer1.Enabled = True
        Timer2.Interval = 100
        Timer2.Enabled = True
        Command1.Caption = "Draw Text"
    End Sub
    'This will draw an Ellipse on the active window
    Sub Timer1_Timer()
        Dim Position As POINTAPI
        'Get the cursor position
        GetCursorPos Position
        'Draw the Ellipse on the Screen's DC
        Ellipse GetWindowDC(0), Position.x - 5, Position.y - 5, Position.x + 5, Position.y + 5
    End Sub
    Sub Command1_Click()    Dim intCount As Integer, strString As String
        strString = "Cool, text on screen !"
        For intCount = 0 To 30
            'Draw the text on the screen
            TextOut GetWindowDC(0), intCount * 20, intCount * 20, strString, Len(strString)
        Next intCount
    End Sub
    Private Sub Timer2_Timer()
        'Draw the text to the active window
        TextOut GetWindowDC(GetActiveWindow), 50, 50, "This is a form", 14
    End Sub