How to save stuff with in a vb 6 project?
similar to i want to do stuff throughout my project and i are interested to commence from ended up i kept it from
ex.if i devote text or number within a text-box after which you can enter spend less then the idea goes suitable label.
and when I close this software and re also open it i’d like to see it to exhibit in the same place.
do we certainly have codes pertaining to this
I would make use of the following code inside Form queryUnload occurrence:
assign variables for those data you intend to save pertaining to text packing containers and labels first
TextBoxVar=Text1, Text
LabelVar=Label1.Caption
Open “TextFile” intended for output while #1
Write #1, TextboxVar, LabelVar
Close
Whenever you open the approval, use the next code throughout FormLoad event
Open “TextFile” intended for append as #1
near #1
Open “TextFile” intended for input while #1
Source #1, TextboxVar, LabelVar
Text1.Text=TextboxVar
Label1.Caption=LabelVar
Near #1
Note this indicates how just to save and recognition two shifting, however this will work for many variables.
The ‘Open “TextFile” pertaining to append since #1″ could be to create the particular text file therefore you won’t get one when anyone first function your application.If the actual file isn’t going to exist if you open this for End result, an malfunction will occur.
With the For Expenditure will develop a new file each and every time you close the necessary paperwork.This can ensure crucial computer data is usually current.
TexMav
Write the data to not for volatile storage space, such while your hard drive, then read it again whenever you rprogram commences.Look way up File IO throughout VB.
Leave a Reply
You must be logged in to post a comment.