TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Charlie Holt
NA
12
49.7k
Unsure of the proper way to use Form.Location...
Nov 22 2010 10:24 PM
I am trying to pull coordinates for a form location out of a database and insert them into the Location property:
childForm.Location = new Point(/* coordinates go here */);
I have tried doing a direct replacement with the DataSet (which didn't work):
childForm.Location = new Point((string)row["location"]);
And I have tried using a string to hold the coordinates:
string Loc = (string)row["location"];
childForm.Location = new Point(Loc);
...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.
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 mistake is?
Thanks!
-Charlie
Reply
Answers (
1
)
Not getting data from Datatable
C#, threading and GUI help needed