PDA

Click to See Complete Forum and Search --> : TextBox Limited in 32K


rogermorelli
Jan 5th, 2000, 07:06 PM
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

Jan 5th, 2000, 07:09 PM
You can use a rich text box instead, if you don't mind exporting as RTF format.

------------------
Matthew Ralston
E-Mail: m.ralston@mediavault.co.uk
ICQ:31422892 (http://www.thebluelink.cjb.net/icq.html)
Web Sites:The Blue Link (http://www.thebluelink.cjb.net) My Home Page (http://mralston.cjb.net) (Not up at the moment!)

cfmoxey
Jan 6th, 2000, 04:08 AM
If you use the Text property instead of the TextRTF property it will export as a perfectly good textfile.

lumin
Jan 6th, 2000, 05:16 AM
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