Results 1 to 4 of 4

Thread: TextBox Limited in 32K

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Porto Alegre,Rio Grande do Sul, Brazil
    Posts
    3

    Post

    TextBox control whith property MultiLine=True is limited in 32K.
    How can I broken this limit?
    For example if I need read un archive .txt to this textBox?
    Thanks,
    Rogerio

  2. #2
    Guest

    Post

    You can use a rich text box instead, if you don't mind exporting as RTF format.

    ------------------
    Matthew Ralston
    E-Mail: [email protected]
    ICQ:31422892
    Web Sites:The Blue Link My Home Page (Not up at the moment!)

  3. #3
    Member
    Join Date
    Jan 2000
    Location
    Southbridge, MA, USA
    Posts
    40

    Post

    If you use the Text property instead of the TextRTF property it will export as a perfectly good textfile.

  4. #4
    Addicted Member
    Join Date
    Jul 1999
    Location
    Bergen, Norway
    Posts
    143

    Post

    This should do the trick.

    I haven't tested the code yet but it should work.


    Option Explicit

    Private Const LINES = 15
    Private strA() As String

    Private Sub Form_Load()
    Dim intN
    'Load dynamic string array from large text files.
    Open "C:\yourtextfile.txt" For Input As #1 Len = 1024
    Do Until EOF(1)
    intN = intN + 1
    ReDim Preserve strA(intN + LINES)
    Line Input #1, strA(intN)
    Loop
    Close #1

    'Set Scrollbar Prop.
    With vsbTest
    .Min = 1
    .Max = intN
    .SmallChange = 1
    .LargeChange = intN \ 10
    End With
    End Sub

    Private Sub vsbTest_Change()
    Dim IntI As Integer
    Dim strTmp As String

    'Create display string from array elements
    For intI = vsbTest.Value To vsbTest.Value + LINES
    strTmp = strTmp + atrA(intI) + vbCrLf
    Next intI
    txtTest.Text = strTmp
    End Sub


    that should be it..

    hope it helps

    -Lumin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width