0

I want to write a widget which will show statistics data. This widget should always stay at the right bottom corner on the desktop. It should behave like a part of wallpapers, i.e. be always static and behind of all the other windows. I tried everything, and I can't prevent it from hiding when user clicks Windows 10's "show desktop" button (right edge of task bar).

Wachburn
  • 2,842
  • 5
  • 36
  • 59
  • 3
    Working against the OS behavior is always a bad idea – Steve Nov 30 '17 at 17:16
  • 1
    read that post: https://stackoverflow.com/questions/683330/how-to-make-a-window-always-stay-on-top-in-net – Jonathan Applebaum Nov 30 '17 at 17:21
  • @Steve but if user of OS wants this behavior? android allows widgets (small icons with useful information). It wont be annoying at all – Wachburn Nov 30 '17 at 17:28
  • I am not saying that you shouldn't do it. I am saying that It is just difficult to bend the OS to your needs when the OS doesn't provide the proper UI paradigm – Steve Nov 30 '17 at 17:31
  • [Here an example of changing the desktop background](https://learn.microsoft.com/it-it/sysinternals/downloads/bginfo). I don't know if the source code of this tool is available or not. Or if you can use it to drive your requirements. The general idea behind this tool is to modify the bitmap used as background of the desktop adding the text you want to display – Steve Nov 30 '17 at 17:36
  • @Steve i've already implemented this logic - I take current wallpaper, draw on that, and then set as new wallpaper. But that's not flexible, I thought windows 10 has some API like it has for win7 gadgets. – Wachburn Nov 30 '17 at 17:40
  • AFAIK no there are no API for that. But I could be wrong. I have no time to keep myself updated on all the new and fancy improvements to Win10 – Steve Nov 30 '17 at 17:47
  • There is no formal support for this. You can hack it by pinvoking GetDesktopWindow and SetParent. – Hans Passant Nov 30 '17 at 18:26
  • @Wachburn What about a SilverLight Out-of-Browser applications using a NotificationWindow Class (which does exactly that). – Jimi Nov 30 '17 at 19:19
  • thanks everybody, I think I will stay with drawing on wallpaper – Wachburn Nov 30 '17 at 20:11

0 Answers0