Whilst looking for information on how to make a window stay on top using C#, I spotted some odd solutions on a number of other web sites. After looking through the Form properties in Visual Studio C# 2008 myself it turns out that it is really easy to make a window stay on top. I added a check box to by application and when it is ticked the window stays on top.

private void stayOnTopCheckBox_CheckedChanged(object sender,
EventArgs e)
{
if (stayOnTopCheckBox.Checked)
{
this.TopMost = true;
}
else
{
this.TopMost = false;
}
}
Along the same theme of ‘very cheap and quick tricks that you add to your C# program’ I added another box to make the window transparent. Below is the code and the result of ticking this box.
private void transparentCheckBox_CheckedChanged(object sender,
EventArgs e)
{
if (this.transparentCheckBox.Checked)
{
this.Opacity = 0.5;
}
else
{
this.Opacity = 1;
}
}

![[del.icio.us]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/facebook.png)
![[Fark]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/fark.png)
![[Google]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/google.png)
![[LinkedIn]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/linkedin.png)
![[MySpace]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/myspace.png)
![[Newsvine]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/newsvine.png)
![[Propeller]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/propeller.png)
![[Reddit]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/technorati.png)
![[Twitter]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/twitter.png)
![[Windows Live]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.reviewmylife.co.uk/blog/wp-content/plugins/bookmarkify/email.png)










Thanks a lot for the tips. I didn’t ever realise that this was so simple :). Thanks again.
Thanks, Just what I needed….
FYI, for noobs (
add your own check box and double click on it and then add
ie
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
this.TopMost = true;
else
this.TopMost = false;
}