I am trying to pull coordinates for a form location out of a database and insert them into the Location property:
I have tried doing a direct replacement with the DataSet (which didn't work):Code:childForm.Location = new Point(/* coordinates go here */);
And I have tried using a string to hold the coordinates:Code:childForm.Location = new Point((string)row["location"]);
...which also didn't work. If I print 'Loc' to the screen, I can see it passing valid coordinates (in this case "100, 200" and "300, 600"), but it errors out when I try to pass that information to childForm.Location.Code:string Loc = (string)row["location"]; childForm.Location = new Point(Loc);
Obviously I'm doing something very wrong here, but I was unable to find any examples of using non-static or non-relative coordinates. If you know, could you please tell me what my misatke is?
Thanks!
-Charlie




Reply With Quote
