|
-
Mar 26th, 2000, 07:30 AM
#1
Thread Starter
Hyperactive Member
Hello, I am having trouble saving large amounts of data.
I have many Multi-Line textboxes that I must Save. I need to save them to a file, and only one file.
I want to use the Print Property if i can.
I have two ways that i could try.
#1
Is there a way to save two lines between each textbox i save IE
Print "---------Start Here----------"
Print text1.text
Print "---------End Here----------"
and then Search for the first set of lines and put anything between them into the first Textbox, and the second pair in the next, ECT.
OR #2
Is there a way to make another textbox, and make it the same as the first but every line is turned into one, but between each line is a special character like IE
Textbox one:
yo
wuz
Up
texttwo:
yowuzup
And it will save textbox #2, then when you open it, it will open to textbox 2, and anything in textbox 2 will go to textbox one,,, but any will make anything after go to the next line.
Which way is better? And can anyone help me do it that way?
Thanks.
[Edited by progeix on 03-26-2000 at 07:32 PM]
-
Mar 26th, 2000, 01:35 PM
#2
Addicted Member
The first way you suggest would work:
Say you have 2 text boxes, text1 and text2. when saving do this:
print #1, "text1"
print #1, text1.text
print #1, "text2"
print #1, text2.text
then, in your routine to get the text back
open the file and use
(assuming you open it as number 1
dim thetextbox as textbox
dim strTheText as string
do until eof(1)
Line Input #1, strTheText
if strTheText = "text1" then
set thetextbox = text1
elseif strTheText = "text2" then
set thetextbox = text2
else
thetextbox.text = strTheText
end if
loop
This is off the top of my head but it should work.
Hope it helps
[Edited by funkyd77 on 03-27-2000 at 01:36 AM]
-
Mar 26th, 2000, 08:42 PM
#3
Member
I would suggest you use an extended ASCII character (128-255) to seperate two textboxs in one file. What if the text box contained the same seperater string, your textboxes will contain the wrong data. Use characters the user can't enter as seperators. Besides it is easier to find a single character than a whole text string in a text file.
-
Mar 27th, 2000, 05:38 AM
#4
Thread Starter
Hyperactive Member
Ok So, this will search for the 2 Characters (that i set) and anything between them will go into a textbox?
Is there anyway to make the first one it finds go to like text1.text the second go to like YoWuzup.text or something to that nature? I have over 77 Things i need to save.
I have 77 buttons, and each button i need to save and get the TAG, Text,Tooltip text from and to the same button.
So if you can think of a really good way(hard or easy) i would appreciate it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|