I have a windows form application that acts as a subscriber of a WCF Service and an asp.net application as the publisher.
Whenever the publisher publishes a post, my winform app will call to display a notificationForm at the bottom right corner of the screen. (something like what you see when someone logs in into msn)
if a second post is published, the height attribute of the location would be added to make it appear such that it is directly above the previous window. (another similar scenario to msn when two person logs in)
my problem is, even after i close my previous notificationForms, the subsequent notificationForm would still continue to escalate upwards. Is it possible to check the status of closed forms such that I can reset the locations of my forms?
I am currently using an arrayList to add the forms into.
the following code is how i code to update the coordinates
if (notificationList.Count == 0)
{
y = 0;
}
else
{
for (int i = 0; i < notificationList.Count; i++)
{
y = y - 140;
}
}
thanks!
If by “checking status of the closed forms” mean checking wether or not they are closed, you can check the IsDisposed property.