none
Problem with user settings in vb application RRS feed

  • Question

  • My program has a number of user settings. I checked the box in the application window to have the program save the settings when the program shuts down. At startup, the load event of the Main form sets various checkboxes and other controls to reflect the state of each setting, which were preserved at the last shutdown. It all works fine on my computer when I run it under the vb IDE

    I created an install for the program with Advanced Installer and when I run that on my computer, it installs the program and everything works fine again.

    But when I send the install to my son and he installs the program on his computer, the program doesn't save the settings like it does on mine. Either that, or it doesn't load them when it restarts.

    I don't think the problem is with his computer, because I have another program and the settings for that one get saved and reloaded normally. So I think it's something wrong with something I've done in creating my program. I have no idea what that could be.

    Does anyone know what might be causing this problem? Thanks.


    Robert Homes

    Thursday, October 12, 2017 6:40 AM

Answers

  • Cor,

    I found the error. It was in my program. I was accidentally setting a variable that conflicted with one of the program/user settings, and that threw everything off. Thanks for offering to help, but the problem is fixed now.


    Robert Homes

    • Marked as answer by Robert Homes Friday, October 20, 2017 1:56 PM
    Friday, October 13, 2017 12:36 AM

All replies

  • Where are the settings saved? a file, registry, project settings(My.Settings), or something else?

    Ashidacchi

    Thursday, October 12, 2017 6:50 AM
  • my.settings

    Robert Homes

    Thursday, October 12, 2017 6:56 AM
  • Ask where he installed his program. 

    If it is in a read only folder than your problem is in my perception clear. 


    Success
    Cor

    Thursday, October 12, 2017 6:59 AM
  • 1.  Did your son install your software? or copied files to his computer?
    2.  Is your software loaded (executed) on his computer?
    3.  What kind of data are saved in My.Settings?

    Ashidacchi


    • Edited by Ashidacchi Thursday, October 12, 2017 7:05 AM
    Thursday, October 12, 2017 7:04 AM
  • Cor,

    I feel sure it is not in a read only folder. But I will check with him tomorrow on that. Thanks.

    Meanwhile, I'm on the track of something in my program that might have caused this. Please don't devote any more effort to this until I find out if that was the problem.


    Robert Homes

    Thursday, October 12, 2017 7:26 AM
  • Ashidacchi,

    1. My son installed my program using the install program I created. He didn't just copy files to his computer.

    2. The software was installed and then executed by the installer on his computer. (He is in a firm that has a server and others with their own desktop computers, all tied in a network. But I am pretty sure he installed the program on his own "C" drive where it would not be affected by the network or other users.)

    3. The data that is saved in my.settings includes a number of integers (representing the Top, Height, Left and Width of each program window), a number of strings and a lot of boolean values. Also, there is a font saved in one setting. Nothing that unusual.

    Now I must tell you what I told Cor above -- Meanwhile, I'm on the track of something in my program that might have caused this. Please don't devote any more effort to this until I find out if that was the problem.

    Thanks for helping. I'll get back to you both when I find out more.



    Robert Homes

    Thursday, October 12, 2017 7:31 AM
  • Cor,

    I found the error. It was in my program. I was accidentally setting a variable that conflicted with one of the program/user settings, and that threw everything off. Thanks for offering to help, but the problem is fixed now.


    Robert Homes

    • Marked as answer by Robert Homes Friday, October 20, 2017 1:56 PM
    Friday, October 13, 2017 12:36 AM
  • Hi Robert,

    It seems that you have solved your issue now, if yes, please remember to close your thread by marking the helpful post as answer, it is beneficial to other community members who face the same issue.

    Thanks for your understanding.

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 20, 2017 9:21 AM
    Moderator