Results 1 to 11 of 11

Thread: [RESOLVED] How Make A Permanent Change in VB6 Program Without Involving Database?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2015
    Posts
    103

    Resolved [RESOLVED] How Make A Permanent Change in VB6 Program Without Involving Database?

    I am sorry if this is a stupid question.

    Lets say I want users to be able to permanently change a label in a vb form, so that the next time they launch the program, the change that they made in that label is still there. Lets say changing the company's name, or address, or telephone number, etc. All without involving database. Can I do this?
    Last edited by xboner; Jul 24th, 2017 at 08:26 PM.

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,398

    Re: How Make A Permanent Change in VB6 Program Without Involving Database?

    The simple answer would be to change the name and re-compile, however, my guess is that you want the program user to be able to do this without access to the source code. If that is correct, then a simple settings file might be one answer. VB6 programs used .ini files for things like this.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2015
    Posts
    103

    Re: How Make A Permanent Change in VB6 Program Without Involving Database?

    Quote Originally Posted by jdc2000 View Post
    The simple answer would be to change the name and re-compile, however, my guess is that you want the program user to be able to do this without access to the source code. If that is correct, then a simple settings file might be one answer. VB6 programs used .ini files for things like this.
    Yes, I should have been clearer with my words. I want users of my program to be able to do that. How can i make an .ini files?

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: How Make A Permanent Change in VB6 Program Without Involving Database?

    There are plenty of examples for working with ini files all over the place.
    http://forums.codeguru.com/showthrea...n-INI-File-VB6
    Other examples
    https://www.google.com/search?q=ini+...utf-8&oe=utf-8

    You also could just use a plain text file or a file with your own custom structure.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: How Make A Permanent Change in VB6 Program Without Involving Database?

    Just be sure you don't make the mistake of trying to place INI files your program must update "next to" the EXE if the program is meant to be installed as a production program in Program Files.

    This is a protected location, and you can end up tying yourself in virtualized file access knots.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Dec 2015
    Posts
    103

    Re: How Make A Permanent Change in VB6 Program Without Involving Database?

    Quote Originally Posted by dilettante View Post
    Just be sure you don't make the mistake of trying to place INI files your program must update "next to" the EXE if the program is meant to be installed as a production program in Program Files.

    This is a protected location, and you can end up tying yourself in virtualized file access knots.
    hmmm...not sure of what that sentence in red means, i am sorry, i am a newb here, can you give more detail?

  7. #7
    gibra
    Guest

    Re: How Make A Permanent Change in VB6 Program Without Involving Database?

    Quote Originally Posted by xboner View Post
    hmmm...not sure of what that sentence in red means, i am sorry, i am a newb here, can you give more detail?
    Read this:
    http://www.vbforums.com/showthread.p...m-uses-creates

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Dec 2015
    Posts
    103

    Re: How Make A Permanent Change in VB6 Program Without Involving Database?

    Quote Originally Posted by DataMiser View Post
    There are plenty of examples for working with ini files all over the place.
    http://forums.codeguru.com/showthrea...n-INI-File-VB6
    Other examples
    https://www.google.com/search?q=ini+...utf-8&oe=utf-8

    You also could just use a plain text file or a file with your own custom structure.
    Quote Originally Posted by gibra View Post
    looks like i need to learn a lot of stuffs, never knew about those things before. thanks guys

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: [RESOLVED] How Make A Permanent Change in VB6 Program Without Involving Database?

    There is a writeup here that is a little long-winded but worth working through at least once:

    Protecting System Files with UAC Virtualization

    Most of the Microsoft info on this topic is no longer online, being presumed to be common knowledge among programmers this late in the game.

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Dec 2015
    Posts
    103

    Re: [RESOLVED] How Make A Permanent Change in VB6 Program Without Involving Database?

    Quote Originally Posted by dilettante View Post
    There is a writeup here that is a little long-winded but worth working through at least once:

    Protecting System Files with UAC Virtualization

    Most of the Microsoft info on this topic is no longer online, being presumed to be common knowledge among programmers this late in the game.
    are you serious?

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: [RESOLVED] How Make A Permanent Change in VB6 Program Without Involving Database?

    Yes, I am. These things changed over 10 years ago, and at the time Microsoft had an entire web site devoted to the changes. That site is now long gone and MSDN only contains a small subset of the information it used to provide.

    Designing UAC Applications for Windows Vista

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