Results 1 to 22 of 22

Thread: Saving settings in VB programs.

Hybrid View

  1. #1
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Saving settings in VB programs.

    Don't use SaveSetting and GetSetting that just puts c*** in the registry. If you uninstall your app then this c*** is left behind. Use an ini file, if your app is setup correctly then it can check to see if the values received from the ini are valid. And you don't have to use Yourapp.ini it can be Yourapp.dll.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Saving settings in VB programs.

    Quote Originally Posted by Keithuk
    Don't use SaveSetting and GetSetting that just puts c*** in the registry. If you uninstall your app then this c*** is left behind. Use an ini file, if your app is setup correctly then it can check to see if the values received from the ini are valid. And you don't have to use Yourapp.ini it can be Yourapp.dll.
    Actually, I've gotten away from using either the .ini file (which I haven't used in years) or the registry. I include a CUSTOM_SETTINGS db table with my application and save all of those things that would be a registry setting or an .ini setting in a table.

  3. #3

  4. #4
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Saving settings in VB programs.

    Quote Originally Posted by MartinLiss
    Yes, it is interesting. The author provides some examples of "flaws inherent to INI files". This is a mis-speak, those are limitations of the Win32 API, not INI files themselves. Text files are not limited to 64Kb, and you can make entries as long as you want.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  5. #5

  6. #6
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Saving settings in VB programs.

    Quote Originally Posted by MartinLiss
    Can you use such things as WritePrivateProfileString with entries longer than 256?
    Possibly, but my point is that this is a limitation of the Win32 API, not of INI Files.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width