ILT – How to bring your window (form) to the top C#

2013/04/11

How to bring a window (form) to the top?

Or how to make your window active from the code?

Simply: call the Activate() function (method) of your form instance.


yourForm.Activate();

// e.g.

if(spamCount  >  10000)
{
   this.lblStatus = "Warning - Spam count is 10,000";
   this.Activate();// This will bring the window to front.
}

Menol
ILT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: