Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Can't reference or access embedded resource

Mar 12 2003 8:30 AM
This is what I am trying to do: ResourceManager RM=new ResourceManager(typeof(Form1)); object font= RM.GetObject("verdana.ttf"); MessageBox.Show(""+font.ToString()); BinaryFormatter B=new BinaryFormatter(); B.Serialize(FS, font); FS.Close(); My only trouble is referencing the embedded resource named, "verdana.ttf". I noticed that VS uses the Resource manager to load pictures into picture boxes. I cannot find where the resource is though. For example, my embedded resource is in the solution explorer with all the classes but theirs I cannot find anywhere. This is what is written in the code to load it: this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox1.Image"))); How can I make a reference to MY embedded resource that is shown in the Solution explorer called verdana.ttf?