Brian,
Use the following in the "Main sub" of your program, this picks up your
users preferences when your mbx starts (by using the homedirectory$()
function you can be assured that when you distribute your MBX everyone can
use it without worrying about where the ini is stored (+ homedirectory$()
function saves writing an arduous winAPI call))

Global MyProgVAR1,MyProgVAR2,MyProgVAR3 as string
sub main
if FileExists(homedirectory$()+"\MyProgINI.ini") then
        open file homedirectory$()+"\MyProgINI.ini" for input as #1
        Line input #1, MyProgVAR1
        Line input #1, MyProgVAR2
        Line input #1, MyProgVAR3
        close file #1
end sub

Elsewhere in your mb use the following to output to that ini file either as
part of a "Preferences Dialog" or as a user exits your mbx.
        open File homedirectory$()+"\MyProgINI.ini" for output as #1
        Print #1, MyProgVAR1  
        Print #1, MyProgVAR2
        Print #1, MyProgVAR3
   Close File #1
I hope this help
Thanks

Tim Chinchen (GIS Systems Developer) 44 1202 454723
I.T. Services Bournemouth Borough Council
Mailto:[EMAIL PROTECTED]

> -----Original Message-----
> From: Brian Upton [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 28, 2000 10:55 PM
> To:   [EMAIL PROTECTED]
> Subject:      MI ini or definition file
> 
> I am trying to figure out how to use an external file to store definitions
> into so that different users can make changes to file without having to
> recompile the program
> 
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to