|
-
Jul 14th, 2006, 07:10 AM
#1
Thread Starter
Hyperactive Member
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?
-
Jul 15th, 2006, 04:55 AM
#2
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
-
Jul 15th, 2006, 09:49 PM
#3
Thread Starter
Hyperactive Member
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#
An example would be helpfull.
-
Jul 16th, 2006, 02:25 AM
#4
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
}
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|