Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Window Manager Class Question
Message
From
01/07/2005 13:14:02
 
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01023603
Message ID:
01028259
Views:
9
>Ok, I can see that. Thanks!

You're welcome! =)

~~Bonnie

>
>>Kevin,
>>
>>Why don't you open the form first, and pass the form into your class. Otherwise, you'd have to use reflection.
>>
>>So, you'd call your manager class like this:
>>
>>MyForm oForm = new MyForm();
>>oWinMgr.OpenForm(oForm);
>>
>>And your WinMgr code would then be:
>>
>>	public class WinMgr
>>	{
>>		// Count of windows open
>>		int iWinCount = 0;
>>
>>		// Array to hold window instances
>>		object[] Windows;
>>
>>		public void OpenForm(Form oForm)
>>		{
>>			>			// Increment the window count
>>			iWinCount++;
>>
>>			// Resize the array to hold the new form instance
>>			Windows = new object[iWinCount];
>>			>			// Store the instance of the form to the array
>>			Windows[iWinCount] = oForm;
>>
>>			// Display the form
>>			oForm.Show();
>>		}
>>	}
>>
>>
>>That should work.
>>
>>~~Bonnie
>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform