Properties.Settings gives error :"0, 0 is not a valid value for Int32"

Happens everytime, don't know why...
Take a form... In properties: ApplicationSettings...Location...new...opens up a standard window to pick a New Application Setting...Take the default value 0;0 or make that anything you want and then somehow that 0;0 turns into 0,0.
Now when I edit it in the Settings.settings and type in 0;0 instead of 0,0 ...pop-up says cann't convert 300;00  to an instance of System.Drawing.Size...

Am I missing something

ps: this is the place where the error occurs.

Tx JMW

[global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
        public global::System.Drawing.Point location {
            get {
                return ((global::System.Drawing.Point)(this["location"]));
            }
            set {
                this["location"] = value;
            }
        }

System.Exception was unhandled



Answer this question

Properties.Settings gives error :"0, 0 is not a valid value for Int32"

  • Jagan P

    Installed the Beta 2 instead of the CTP and the "0,0" "0;0"-problem was fixed.
    But the little thing with the Tooltips is still a bit strange. Well, maybe it was design that way.
    txk Luke
    jmw

  • Srikanth Ravula

    Found a way around it ...

    If I change the "0,0" to "0;0" in the line


    [global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
     

    it works.

     But I have to do that for all the size,points  properties.
    Should go on automatic...No


  • Ferd Biffle

    JMW -

    Why is it that you want to use "0;0" instead of "0,0".  The latter is the standard way of describing Point's as a string, and is the best way to enter values for settings of type Point (as the Location property is).  What is the end goal of what you are trying to do

    Thanks,
    Luke Hoban
    Visual C# IDE Program Manager

  • Lifer

    Luke -
    I donn't want to use "0;0" instead of "0,0". It's just that when I accept all the standard offerings when running through the ApplicationSettings I get the error that I explained in my first post. I cann't run my program. Only after I manually change all the , into ; then it compiles and runs.
    Put another way... Somehow all the settings that relate to type Point gets  me into problems with "0;0" and"0,0" mix ups.
    And the end goal is simple to keep the size and the location of the form in this Properties.Settings.settings.Default. But somehow it doesn't quite work as I expect. But maybe it's because im running the Feb CTP


    On a different note...
    (I'm running the feb CTP) ...
    Put a Tooltip on a form and hook up some tooltips. NowI want to use the Tooltip.Active property in the ApplicationSettings so that I can choose to have tooltips display or not. When I change that value the tooltips don't automatically appear or disapear. If I do the same thing for let's say a button.Backcolor, And I change the property in The ApplicationSettings, the button.backcolor gets updated instantly. Not so with the tooltips.

    txs for listening.
    jmw

  • jlewis99

    I can't seems to reproduce either of these problems in Beta2, so perhaps they have been fixed since the CTP.  That said I may not be fully understanding what you are trying to do.  If you'd like to follow-up on these as bug reports, feel free to submit a bug to http://labs.msdn.microsoft.com/productfeedback/ .

    Thanks,
    Luke Hoban
    Visual C# IDE Program Manager


  • Properties.Settings gives error :"0, 0 is not a valid value for Int32"