0

I've searched around, and I'm not finding a solution to this one so I figured I'd ask you bright people:

Trying to pull form size information out of a database and pass it to a form upon instance.

The relevant code in the parent form is:

childForm.Size = (string)row["size"];

and the relevant code in the childform is:

public string Size { get; set; }

and later, in the form initialization:
this.Size = new System.Drawing.Size(Size);

I'm getting "Cannot implicitly convert type 'string' to 'System.Drawing.Size'".

When I change variable names and play around with it a bit, I'm getting: "Cannot implicitly convert type 'string' to 'System.Drawing.Point'"

The information in my Database is good - at runtime a messagebox in the initialization will show the proper window size. But I'm unable to pass that information to the form properly. Im sure it's a rookie mistake, but my web searches didn't show me a solution. Any help would be greatly appreciated.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by hmortensen
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.