I'm building a WPF application that is designed to act as a notification toolbar for sending messages to users of an enterprise software platform. It's a bar that is a specific height, stretching all the way across the bottom of the user's desktop, sitting directly above the Windows taskbar.
What I'd like to do is to have my application "claim" or "reserve" the space it takes up and not allow any applications to load behind it. For example, if you were to resize your windows taskbar and make it larger, it will move icons and shortcuts, and maximizing windows will only use the desktop area that is not already being used by the taskbar.
Any idea how this could be pulled off? It's already set to be the topmost item on the desktop, so that's not my question. Right now if you opened another app and maximized it, then the bottom X pixels will be hidden behind my toolbar application.
(Note that I've added Windows 7 and Windows XP tags - I'd love to be able to implement this functionality on WinXP and up, but if I'm not able to do so on a particular version or versions, I can come up with a workaround)
These are called AppBars in Windows and you can use the SHAppBarMessage function to "dock" your window to a side of a monitor. Then other windows, when maximized, will not obscure the docked window.
Here's a link to a similar question that has more information, including a link to a CodeProject page that walks you through creating one.
Related
Is there a way to have my windows 8 app slide out to the right as an overlay on top of the desktop if the user has selected the app from the desktop. So it opens as normal from metro but if the user is on the win 8 desktop you just get a smaller version. I know currently you can lock a app in to the side but I find the functionality on a desktop a bit cumbersome.
I would like to have the ability for the desktop users to quickly navigate between the desktop and app with the option to slide back out of view and an option to go to the full screen app.
this functionality, I think is useful for apps like NoteOne or notepad where a user would like a piece of information to complement the work currently being done on the desktop without having to switch between app views
possible?
No, that's not possible as far as I know. You need to use the Windows 8 split view mode.
I would like to establish what is the order of the taskbar items in Windows 7. The reason is that I would like to create an script (written in AutoHotkey or C#) that restore a set of icons to a previous determined order. I wan't to do this because any Virtual Desktop solutions for Windows forget the great and important point of keeping the taskbar item's order, i.e between desktop changes the order of the taskbar items are completely ignored and lost. The reason of why they ignore that fact is maybe because all of them rely in the HIDE/UNHIDE approach, they save what windows are active in any desktop and then between switches they Hide or UnHide the corresponding windows.
I already found a semi solution writted in QT/C++ (Location of app on the Windows 7 Taskbar) that base his function in find the left-upper pixel position of an item based in his color. I don't like that approach because the use of different themes or visual styles would break his functioning. I hope someone has another suggestion. This question differs from that in the link that I'm only interested in the order not in the exact pixel position of any button.
You may want to start with the Windows® API Code Pack for Microsoft® .NET Framework. This API allows you access to several Windows APIs (including certain taskbar functions) from managed code.
However, I'm not certain yet that it allows for functionality regarding the task bar in general vs. a specific application's taskbar entry. I will continue researching this and update if/when I find more information.
I'm creating Silverlight OOB application with its own chrome (title bar, minimize, maximize buttons and so on). I've implemented the resizing functionality and everything works quite good.
Still I would like to add one more functionality. I would like that my app has good docking behavior in Windows 7 OS - maximizing on docking to the top of the screen, changing size to the half of the screen on docking to right or left.
How can I do this? I will be appreciated for any help.
I have a windows mobile professional 6.1 application and I want it to be full screen in all pages so I put the code below into my every pages constructor;
this.WindowState = FormWindowState.Maximized;
this works OK but "sometimes" for example when I use
MessageBox.Show("alert");
or when I try to connect internet within application and there is a problem and Windows shows me some messages popping up from the top of the screen..in this cases I lose my full screen and the top menu bar of windows becomes visible again..
any ideas?
You can use SHFullScreen to hide the start icon and other system areas of the screen. There is an undocumented function named AllKeys which will allow you to block some of the hardware keys (notes, recorder, green + red phone keys) from running. It will require a lot of work because there are many ways to run programs and the taskbar has a habit of reappearing after a program is run. Simply calling SHFullScreen once is not enough. You'll have to handle WM_ACTIVATE messages and call SHFullScreen again and force your program to the top again. It's a struggle against the operating system to have a true kiosk application on Windows Mobile.
Getting an app to "kiosk mode" in Windows Mobile is challenging becasue the platform simply isn't designed for it. This page has a lot of links to resources of getting it working. Using your favorite search engine to look for "compact framework kiosk mode" is likely to bring up more as well.
I'm looking to write a FOSS "Alt+Tab" replacement (window switcher) for Windows, since there are a few features I feel it's (still) lacking; but I'm noticing two quirks I can't seem to fix:
#1. (Somewhat Unrelated) In the default Windows 7 window switcher, one computer allows left clicking on a thumbnail to focus the window; however on another, similarly specced computer, I have to use a right click. The only difference between these two fresh installs is the theme. Any ideas?
#2. (Directly Related) In both the default Windows 7 window switcher and the DWM API output, minimized windows often have no thumbnail, and instead show only the taskbar. This has been a long running problem with the Windows API, and in the past I've seen the popular recommendation being "restore (un-minimize) the window, take a screenshot, then re-minimize" - but this is sloppy and causes flickering, etc. Has anyone done this successfully using the newer DWM API?
If sharing code, I'd prefer C# syntax, but VB.NET will do as well. Thanks!