Article View: ab.software.developers
Article #1243BUFFERING A TEXT FILE INTO 64k CHUNKS AND DISPLAYING THOSE CHUNKS IN A TEXT BOX SMOOTHLY
From: Chetan Phull
Date: Wed, 15 Jul 1998 00:00
Date: Wed, 15 Jul 1998 00:00
81 lines
2980 bytes
2980 bytes
Hello all, my source code here is all fucked. I really need help in
buffering this 5 megs text file into 64k chunks, and then let the user
go through those chunks smoothly.
Example:
1
2
3 -- user sees all this
4
5
user presses down once
2
3
4 -- user sees all this
5
6
user pressed down three times
5
6
7 -- user sees all this
8
9
This is sortof what I want to happen here. Say the text box can only
support five entries. I want it to buffer itself QUICKLY so the user
can scroll through the WHOLE text file painlessly.
Once this program is complete, the company I part-time work for will
be selling each copy of this program for $100 each(Canadian currency).
We deal in custom made spectrometers, and it's my job to make a
display program of all the wave lengths (that's why the text file is
soo big.) When the proram is finished I'll give credit to whoever can
help me solve this problem. Please e-mail me with possible sollutions
and help, it's much appreciated.
Chetan Phull
phull@interlog.com
P.S.: I'm attaching my source code, please download it and make
necessary refinements and e-mail if back to me. If it works to my
satisfaction, you will get credit in the final copy of the program.
P.P.S.: I'm also looking for a font with ALL CHARACTERS EXACTLY THE
SAME SIZE. I tried Courier and System, but different characters have
different widths.
Public Sub Form_Load()
'variable declarations
Dim temp1 As String
temp1 = Array() 'HOW DO I MAKE THIS WORK?
Dim i As Long
'load Waves Database
Open "c:\lambda32\waves.txt" For Binary As 1
Dim FileSize As Long
FileSize = LOF(1)
'i=number of 64k chunks in WAVES.TXT
i = FileSize / 64000
Do While Not EOF(1)
Dim x As Integer
Get #1, i * x, temp1(i)
' txtWaves.Text = temp1 'HOW DO I BUFFER THE DISPLAY?
x = x + 6400
Loop
' For x = 1 To 3
' Input #1, temp1
' lstWaves.AddItem temp1
' Next x
Close #1
End Sub
Technical Details
Message-ID:
<35b3e079.8752711@nntp.interlog.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb992,8565e4732e6cdcba,start X-Google-Attributes: gidfb992,public X-Google-Thread: 111c14,8565e4732e6cdcba,start X-Google-Attributes: gid111c14,public X-Google-Thread: 10b997,8565e4732e6cdcba,start X-Google-Attributes: gid10b997,public X-Google-Thread: 10f2ee,8565e4732e6cdcba,start X-Google-Attributes: gid10f2ee,public From: phull@interlog.com (Chetan Phull) Subject: BUFFERING A TEXT FILE INTO 64k CHUNKS AND DISPLAYING THOSE CHUNKS IN A TEXT BOX SMOOTHLY Date: 1998/07/15 Message-ID: <35b3e079.8752711@nntp.interlog.com> X-Deja-AN: 371724310 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii NNTP-Posting-Time: 15 Jul 1998 16:54:22 GMT Organization: Trulogic Systems Inc. Mime-Version: 1.0 Newsgroups: ab.software.developers,comp.lang.visual.basic,it.comp.lang.visual-basic,no.it.programmering.visual-basic