Windows Develop Bookmark and Share   
 index > Windows Forms General > SHowing a panel above taskbar
 

SHowing a panel above taskbar

Hi,

I'm making an app where I need to display a panel that will position itself next to the mouse cursor. I've used interop to hook into the Windows API to track the mouse movement outside of my app and can position the panel accordingly. However, if I move the mouse below the taskbar, the panel appears "behind" the taskbar - that is, the taskbar hides my panel. Is there any way to have the taskbar appear behind my panel? Can this be done through .net, or do I need to use some interop to the API? If the latter, which API function do I need to call?

Thanks in advance.

HeartattacK  Monday, July 07, 2008 8:26 AM

The trouble was that the position was being set in code. Dragging it obviously had it in front of the taskbar. However, after setting the location, it seemed to go behind it. I fixed it by adding a call to this.BringToFront() after setting the position. I don't know why on earth that needs to be called when the TopMost is set to true, but that's working.
HeartattacK  Monday, July 07, 2008 4:11 PM
Set the TopMost propery of your app's main window to 'true'

hth,
Lior.
Lior Salem  Monday, July 07, 2008 9:05 AM

Setting the topmost to true makes it come on top of all other forms, but it remains behind the taskbar. I need a way to bring it in front of the taskbar. Any ideas on that?
HeartattacK  Monday, July 07, 2008 3:17 PM
Strange... I opened a new WindowsApplication, set Form1.TopMost=true and ran the application.
Dragged the Form around the screen and it was always on top even when dragged over the task bar.
Maybe if you could post some code...
Lior.
Lior Salem  Monday, July 07, 2008 3:50 PM

The trouble was that the position was being set in code. Dragging it obviously had it in front of the taskbar. However, after setting the location, it seemed to go behind it. I fixed it by adding a call to this.BringToFront() after setting the position. I don't know why on earth that needs to be called when the TopMost is set to true, but that's working.
HeartattacK  Monday, July 07, 2008 4:11 PM

You can use google to search for other answers

Custom Search

More Threads

• Menubar items navigaion not happening in proper direction using left, right arrow keys on the keyboard
• How To Set Default PrinterResolution for PageSetupDialog in .NET 2
• Can listView Show Images in diferrent Size?
• display server time in client form
• Form - Maximum Height
• MDI Parent Menu
• How can we display highlighted items in List view Control in case of Windows Application.
• Switching between user controls on a windows form.
• FolderBrowserDialog Bug. Dialog keeps crashing on x64 system
• ToolStripProgressBar Marquee