Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Save Settings To A Filename 1

Status
Not open for further replies.

MrVB50au

Programmer
Mar 16, 2003
326
AU
Here's what's happening:

I have a DB file with lots of records, when I click on a button, it uses the currently displayed record to open another form that has a picturebox with label controls containing the information just gathered.

After manipulating fontname size and positioning the labels on the picturebox etc. Instead of saving the picturebox only (with the details) as a bmp file, I would like to allow the user to type a filename and have the settings (eg: fontname, size, color, etc.) saved into that file.

As it is at the moment the user needs to recreating the whole thing just to make a few adjustments.

I would like the user to be able to open the saved file and simply make the appropiate adjustments then resave it again.

Is it possible that this can be achieved?

Thanks for your valuable time,

Andrew.
 

>...you think?

Yes

>After loading the file, do I simply use the Close function or would I need to specify the actual file?

File Number...
[tt]FNumb = FreeFile
Open FName For Input As #FNumb
'...
Close #FNumb
[/tt]

>Is there a way that I can make the Close function tell it what file to close?...

Several ways from a UDT to arrays to keep track of what is open, but what would be simplier (is that a word) would be to only allow one file open at a time.

Good Luck

 
ok, that makes more sence to me.

Public FileNum As Integer

Then in the code at the beginning of the call to ini file I would the put:

FileNum = FreeFile
Open CardFile For Input As #FileNum

Then at the end of the opening of the ini file I would put:

Close #FileNum

Would I be on the right track here then?

Thanks again,

Andrew.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top