Aug 17th, 2007, 04:13 PM
#1
Thread Starter
Member
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.
Aug 17th, 2007, 04:21 PM
#2
Frenzied Member
Re: Why doesn't this work? My.Settings.Save Help please.
Place this in your code before you close the app:
My.Settings.Save()
Aug 17th, 2007, 04:33 PM
#3
Frenzied Member
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?
Aug 17th, 2007, 04:49 PM
#4
Thread Starter
Member
Re: Why doesn't this work? My.Settings.Save Help please.
Aug 17th, 2007, 04:54 PM
#5
Member
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.
Aug 17th, 2007, 05:01 PM
#6
Thread Starter
Member
Re: Why doesn't this work? My.Settings.Save Help please.
Aug 17th, 2007, 05:45 PM
#7
Thread Starter
Member
Re: Why doesn't this work? My.Settings.Save Help please.
Aug 17th, 2007, 06:04 PM
#8
Re: Why doesn't this work? My.Settings.Save Help please.
post your project here. I 'll take a look on it.
Aug 17th, 2007, 06:11 PM
#9
Thread Starter
Member
Re: Why doesn't this work? My.Settings.Save Help please.
Here you go.
ITs on Form2 btw not Form1
Attached Files
Aug 17th, 2007, 06:36 PM
#10
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.
Aug 17th, 2007, 09:04 PM
#11
Re: Why doesn't this work? My.Settings.Save Help please.
Let me ask this.... what makes you think it isn't saving?
-tg
Aug 18th, 2007, 01:02 AM
#12
Thread Starter
Member
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
Aug 18th, 2007, 01:22 AM
#13
Re: Why doesn't this work? My.Settings.Save Help please.
it says cannot find program
No wander I couldn’t open it
Aug 18th, 2007, 01:28 AM
#14
Thread Starter
Member
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
Aug 18th, 2007, 02:56 AM
#15
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.
Aug 18th, 2007, 04:20 AM
#16
Thread Starter
Member
Re: Why doesn't this work? My.Settings.Save Help please.
Aug 19th, 2007, 01:49 AM
#17
Thread Starter
Member
Re: Why doesn't this work? My.Settings.Save Help please.
Aug 19th, 2007, 02:59 AM
#18
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
Forum Rules
Click Here to Expand Forum to Full Width