Results 1 to 18 of 18

Thread: Why doesn't this work? My.Settings.Save Help please.

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Why doesn't this work? My.Settings.Save Help please.

    Code:
            OpenFileDialog3.ShowDialog()
            My.Settings.Process3 = OpenFileDialog3.FileName
            My.Settings.Save()
    
    
            Form1.Process3.StartInfo.FileName = My.Settings.Process3




    It won't save the settings, I close the app and it doesn't save the setting. Help please.

  2. #2
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,051

    Re: Why doesn't this work? My.Settings.Save Help please.

    Place this in your code before you close the app:

    My.Settings.Save()

  3. #3
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,051

    Re: Why doesn't this work? My.Settings.Save Help please.

    Oops, sorry about that. I didn't read your code very close did I?

  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    =P lol

  5. #5
    Member
    Join Date
    Jul 2007
    Location
    Silly Clone Valley CA
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    is your process3 setting set to user or application? It will only work if it is set to user.

  6. #6

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    its set to user

  7. #7

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    Help =(

  8. #8
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Why doesn't this work? My.Settings.Save Help please.

    post your project here. I 'll take a look on it.

  9. #9

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    Here you go.


    ITs on Form2 btw not Form1
    Attached Files Attached Files

  10. #10
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Why doesn't this work? My.Settings.Save Help please.

    There is some thing is wrong with your solution file! I can't open it.

  11. #11
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Why doesn't this work? My.Settings.Save Help please.

    Let me ask this.... what makes you think it isn't saving?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  12. #12

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    Because I exit the program purposly and when i load it again and hit the WoW button it says cannot find program

  13. #13
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Why doesn't this work? My.Settings.Save Help please.

    it says cannot find program
    No wander I couldn’t open it

  14. #14

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    I keep the ControlPanel.exe.config with it but it just doesnt wanna change its stuff it stays how it always has

  15. #15
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Re: Why doesn't this work? My.Settings.Save Help please.

    User settings aren't saved to the config file in the application folder. They are saved to a different config file tucked away deep in the user's documents and settings folder structure. So if you check the one in the application folder you will never see it change. Only application settings are stored there and those are read only. When you test to see if it saved then trying running the exe outside of VS on the second try.

  16. #16

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    still no luck

  17. #17

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    47

    Re: Why doesn't this work? My.Settings.Save Help please.

    Help >.<

  18. #18
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Re: Why doesn't this work? My.Settings.Save Help please.

    It is saving just fine but you are overwritting it in the Form2_Load event with a blank string from Form1.Process3.StartInfo.FileName which is not set to the value in the fil at the start of the application.

    If you set a break point in that event after saving something you will see that My.Settings.Process3 is populated until you assign it the value from Form1.Process3.StartInfo.FileName.

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