SA-MP Forums Archive
(C#) Calling parent form - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: (C#) Calling parent form (/showthread.php?tid=94395)



(C#) Calling parent form - StrickenKid - 29.08.2009

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



Re: (C#) Calling parent form - kaisersouse - 29.08.2009

This is not a c# forum