From: Price on
To David Streeter,
What is wrong with the reply? It makes perfect sense to me. That reply answered my question.



surtur wrote:

Re: Re: Is anyone able to make My.Settings work? I can't!
30-Jun-08

"Cor Ligthert[MVP]" wrote:

What a rude and unhelpful reply!

--
David Streeter
Synchrotech Software
Sydney Australia

Previous Posts In This Thread:

On Sunday, June 29, 2008 9:07 PM
Just_a_fa wrote:

Is anyone able to make My.Settings work? I can't!
I save some data to an array in my program. I can reopen the setting
screen and see that the data is, in fact, in the array.

I then do a lot of these:

My.Settings.Brkr1 = BreakerAmps(1)
My.Settings.Brkr2 = BreakerAmps(2)
My.Settings.Brkr3 = BreakerAmps(3)
My.Settings.Brkr4 = BreakerAmps(4)
My.Settings.Brkr5 = BreakerAmps(5)


then I do a: My.Settings.Save

after all of the My.Settings commands and exit the program.


On the way in next time, I do:

BreakerAmps(1) = CInt(My.Settings.Brkr1)
BreakerAmps(2) = CInt(My.Settings.Brkr2)
BreakerAmps(3) = CInt(My.Settings.Brkr3)
BreakerAmps(4) = CInt(My.Settings.Brkr4)
BreakerAmps(5) = CInt(My.Settings.Brkr5)

and when I get to my settings screen, they are back to the default that
was entered when I set up the settings entries by hand.

I tried doing a My.Settings.Reload during the invocation just in case
but it made no different.

Ideas?

Where can I see the "persistent" values so help find the problem area.

My MSDN help is still broken via the VS help system. Says it is down
(does not seem to be) or my User/PW is broken (but does not let me
reenter it) so getting help got just that much harder and it was already
hard enough!

Mike Morrow
MMSA00E62537

On Sunday, June 29, 2008 11:31 PM
Cor Ligthert[MVP] wrote:

Mike,In this millenium there is more than Atari programming.
Mike,

In this millenium there is more than Atari programming. The mySettings are
based on all kind of data in the computer.

By instance the XML config file. It is not just simple a piece of memory
that you withouth having allocated can use.

Cor

<Just_a_fan(a)home.net> schreef in bericht
news:r1cg64tve64rgb7t4q4paalm1q3udjnij9(a)4ax.com...

On Monday, June 30, 2008 12:35 AM
Just_a_fa wrote:

I found out what is happening.
I found out what is happening.

When you copy code around to clean things up a little bit and get stuff
that is similar, together, (refactoring, sorta) VB loses the Handles
clauses. They simply vanish. It has happened several times to me and
this time, it happened on the form close and it was not running to save
the values. I put it back in and now the routine runs and I save the
data.

Don't say I forgot to copy it. I copied the Sub command and the code
and the Handles is right inline with it. I could not miss copying it
when I move a whole routine but at the destination, the Handles is
missing and I missed noticing that it had gone away.

Settings is not "working" since the routine to drive it is back.

I hope someone fixes that little problem soon.

Mike

On Mon, 30 Jun 2008 05:31:28 +0200, in
microsoft.public.dotnet.languages.vb "Cor Ligthert[MVP]"
<notmyfirstname(a)planet.nl> wrote:

On Monday, June 30, 2008 1:11 AM
Cor Ligthert[MVP] wrote:

Mike,That is no problem, the problem is that you are meshing up with the code.
Mike,

That is no problem, the problem is that you are meshing up with the code.

You can cut it and set it on another place, but how would be known which of
the exact equal event methode should be taken as you copy it. Be happy that
it is not deleted from the original one too.

However, I am curious how you think that you can refactor code as you don't
even know the basics?

Cor



<Just_a_fan(a)home.net> schreef in bericht
news:sdog64d66h6ae866uvmlkb2gg2lbcbqp63(a)4ax.com...

On Monday, June 30, 2008 1:15 AM
ShaneO wrote:

Re: Is anyone able to make My.Settings work? I can't!
Just_a_fan(a)home.net wrote:
I've posted the following code at earlier times, and I'll list it again,
it will fix your problem -

1. Create a new setting, such as "SettingsValid" and set its default
value to False. (This is important!)

2. Place the following code at the beginning of your Form_Load event -

If Not My.Settings.SettingsValid Then
My.Settings.Upgrade()
My.Settings.SettingsValid = True
My.Settings.Save()
End If


Hope this helps.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.

On Monday, June 30, 2008 9:58 AM
Herfried K. Wagner [MVP] wrote:

Re: Is anyone able to make My.Settings work? I can't!
<Just_a_fan(a)home.net> schrieb:

Make sure the settings are /user/ settings and not /application/ settings.
Only user settings can be saved.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

On Monday, June 30, 2008 9:42 PM
surtur wrote:

Re: Re: Is anyone able to make My.Settings work? I can't!
"Cor Ligthert[MVP]" wrote:

What a rude and unhelpful reply!

--
David Streeter
Synchrotech Software
Sydney Australia

On Monday, June 30, 2008 11:25 PM
Cor Ligthert[MVP] wrote:

Did you understand it?Cor
Did you understand it?


Cor

On Sunday, December 13, 2009 12:09 AM
Price Brattin wrote:

Is anyone able to make My.Settings work? I can't!
To: David Streeter,

What is wrong with the reply? It makes perfect sense to me. That reply answered my question.


Submitted via EggHeadCafe - Software Developer Portal of Choice
XML Data Compression / Decompression Over the Wire
http://www.eggheadcafe.com/tutorials/aspnet/7890661e-531f-4db7-bbf1-cad42eba100b/xml-data-compression--de.aspx