(C#) Calling parent form
#1

I'm having a little trouble with this :S

I'm trying to set form 1's picture box image from a second form but it doesn't want to work D:

Код:
    public void button1_Click(object sender, EventArgs e)
    {
      Form1 form1 = new Form1();
      form1.pictureBox.Image = Image.FromFile(...);
  
    }
That's the code, anyone know whats wrong?

EDIT: The error its giving me is :
Код:
Error	2	'Mapper.Form1.pictureBox' is inaccessible due to its protection level	C:\Users\Ethan\Documents\Visual Studio 2008\Projects\Mapper\Mapper\MapSelector.cs	50	19	Mapper
Reply


Messages In This Thread
(C#) Calling parent form - by StrickenKid - 29.08.2009, 18:26
Re: (C#) Calling parent form - by kaisersouse - 29.08.2009, 18:29

Forum Jump:


Users browsing this thread: 1 Guest(s)