C# 3.0 - Converting string / object to System.Drawing.Point

Aldo Liaks posted at 11-May-08 01:09

Hi guys,

I am still working on a multilingual application.

I am trying to use the statement below, but getting an exception.

I first tried with the value è  "11, 19" in the resource file.

tabControl1.Location = (Point)Enum.Parse(typeof(Point), rmLanguage.GetString("tabControl1.Location"));

Exception: An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll. Additional information: Type provided must be an Enum.

Then I tried changing the value in resource file to è new System.Drawing.Point(11, 19)

And still getting the same exception: An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll. Additional information: Type provided must be an Enum.

I'll appreciate any help,

Thanks,

Aldo.


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  C# 3.0 - Converting string / object to System.Drawing.Point - Aldo Liaks  11-May-08 01:09 1:09:06 AM
      Try - sundar k  11-May-08 03:00 3:00:16 AM
          It WORKS - Aldo Liaks  11-May-08 04:10 4:10:08 AM
          Another way? - Aldo Liaks  11-May-08 04:17 4:17:52 AM
          Convert to System.Drawing.SystemColors.Window - Aldo Liaks  11-May-08 07:43 7:43:30 AM
              System.Drawing.Color - sundar k  11-May-08 11:22 11:22:25 AM
                  Nice - Aldo Liaks  12-May-08 02:45 2:45:30 AM
      See more - Rave Rasaiyah  11-May-08 09:25 9:25:26 PM
          Sounds logic... - Aldo Liaks  12-May-08 02:11 2:11:38 AM
View Posts