Hey everybody,
I'm making an application that sort-of works like a desktop widget.
My widget should stay visible when a user triggers "Show Desktop" (it's what happens when WinKey+D is pressed).
How do I do this?
Thanks for your help,
Alexander.
Printable View
Hey everybody,
I'm making an application that sort-of works like a desktop widget.
My widget should stay visible when a user triggers "Show Desktop" (it's what happens when WinKey+D is pressed).
How do I do this?
Thanks for your help,
Alexander.
using a timer?? that is what i do most of time.
If Me.WindowState = FormWindowState.Minimized Then
or you can remove the controlbox an set the topmost property to true
There's no need to use a timer, you can put your trap in the form's sizechanged event :
Its not an ideal solution though as you will get a flicker as the form is minimized and then restored.Code:Private Sub Form1_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
If Me.WindowState = FormWindowState.Minimized Then
Me.WindowState = FormWindowState.Normal
End If
End Sub
Although with a little experimenting it turns out that neither of them seem to work properly in the case of Win+D - it seems that this does something more than minimising the form - it appears to make it invisible as well.
That's exactly my problem... It seems like no events are triggered for my program when the "Show Desktop"-command is executed.
Having had a quick google around, there's some code using APIs to prevent this happening in this article on MSDN. I haven't tried it myself but it may work.
thats weird.
when i try the option to set topmost and no border it works fine here....