I want create a form in C# that always be on top of taskbar and other programs. I try with Topmost but when I click on Alt+Tab or start button on keyboard, taskbar is top of my form.
Asked
Active
Viewed 1,539 times
3
-
3Preventing the user from using his taskbar and the windows of other apps is excessively hostile. Windows will not put up with that. The only way to do it is go whole-hog, you must create a borderless window that's maximized. – Hans Passant Sep 17 '15 at 11:48
-
3Relevant: http://blogs.msdn.com/b/oldnewthing/archive/2005/06/07/426294.aspx – Mark Jansen Sep 17 '15 at 11:54
-
@MarkJansen Best text ever, was about to post that :) – Binkan Salaryman Sep 17 '15 at 12:50
1 Answers
1
Ugly approach: use Timer.
private void timer1_Tick(object sender, EventArgs e)
{
this.TopMost = true;
}
Better not to do so.

Alexander Petrov
- 13,457
- 2
- 20
- 49
-
-
if i clicked on Alt + Tab or start button,taskbar is top of my form.your solution doesnt work – neli Sep 18 '15 at 15:50
-
@neli - The taskbar is usually located below the desktop. What appears when you press Alt + Tab is not the taskbar. – Alexander Petrov Sep 18 '15 at 15:56
-
but taskbar comming up.i want my form always be top of other programming even startmenu – neli Sep 18 '15 at 16:03
-