Windows forms set saved groupbox location settings
Parsing the settings strings character by character is troublesome and can be hard to get it right.

It would be better to use a regex to match the string and extract the relevant parts using capture groups, for example:

\[(\d+):\{X=(\d+),Y=(\d+)\}\]




Debuggex Demo

I know too little of C# to give a sample implementation,
in case it helps, here it is in Java:

Pattern pattern = Pattern.compile("\\[(\\d+):\\{X=(\\d+),Y=(\\d+)\\}\\]");
String sample = "[1:{X=7,Y=29}][2:{X=52,Y=433}]";

Matcher matcher = pattern.matcher(sample);
while (matcher.find()) {
    int id = Integer.parseInt(matcher.group(1)),
    int x = Integer.parseInt(matcher.group(2)),
    int y = Integer.parseInt(matcher.group(3))
    // do what you need with id, x, y
}