Passing ImageList between forms
Hi,
I have two forms frmMain and frmUsers.
frmMain has an ImageList, and I fill that list with pics from file when program starts.
However I need to use the pics from the ImageList on my other form.
How can I use the ImageList from frmMain in my other form?
Re: Passing ImageList between forms
If you instantiate both frmMain and frmUsers from the same module, they will now be visible to each other. You can then, from frmUsers, access the ImageList like so:
frmMain.ImageList1.properties[index]
HTH
Re: Passing ImageList between forms
Hi,
That sounds promising but... I've no idea how to "instanciate both forms from the same module". I'm new to c# :p
An example would be helpfull.
Re: Passing ImageList between forms
This is an example of what he means:
Code:
public static void Main()
{
frmMain f1;
frmUsers f2;
//The rest of your code
}