Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

Creating INI Files

Question:
How do I create INI files to meet the common microsoft standard?

Answer:
INI files can be created with Notepad, or any other plain text editor. Once the file is created, or even if it is not, you can use GetPrivateProfileString and WritePrivateProfileString to write settings to the file. If, for instance, you want to do a write to a non-existent INI file, Windows will create the file for you when you do your first write to it with WritePrivateProfileString. Your best bet for structuring is to look at existing INI files on your drive, especially ones written by Microsoft programs. Please note that the use of private INI files is becoming less and less common with VB4 32-bit and the 32-bit OS's (Windows '95 and NT 4.0). The proper thing to do there is to write to the registry. VB 4 provides four functions to access the registry without much trouble. Note that these functions are somewhat limited, the best way to go about it is with the API calls provided. You can find out more about the four built-in functions from the March issue of VBOnline magazine (and other resources).

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date