I want to pin a WPF window on the desktop (it should be a desktop gadget).
I know you can do this by setting the parent handle of the WPF window to the handle of the "progman" window.
But this does not prevent the hiding of the WPF window when "Windows + D" is pressed.
There must be another way do to this. The new desktop gadgets in Windows 7 are not hidden when "Windows + D" is pressed. How did the MS developers achieve this?
I think your best bet would be to create a Gadget and host your WPF using either of the following options
1- WPF hosted using an IFrame.
WPF Vista Gadgets - Part 1: Using XBAP and IFRAME
2- WPF hosted in the Gadget using ActiveX
http://blogs.msdn.com/karstenj/archive/2006/10/09/activex-wpf-gadget.aspx
http://blogs.msdn.com/jaimer/archive/2006/10/02/writing-a-.net-activex-control-for-your-sidebar-gadget_2E002E00_.aspx
The linked articles are for Vista but the concepts should be the same since Windows 7 gadgets are backwards compatible with Vista gadgets.
Try this
Create a XBAP Application in VS.
Follow the standard pattern of a Window Gadget.
Call the XBAP app exe from java script in the web page.
Finally zip your directory structure and change its extension to .gadget
your wpf gadget is ready to deploy
Related
I have an app in Windows Forms, written in C# (.Net 4.7.2) that, when minimized, goes to the system tray.
The requirement is that when the user clicks on the desktop shortcut again, if the application is already running hidden in the tray, the screen should be restored instead of opening a new instance of the same application.
I know that this behavior is common in several applications, but I still haven't found a way to do this in Windows Forms.
Thanks in advance!
I am developing a win store application, user can launch other file/application from my application. At that point, I want to keep my application in front of user in the "snap view"
For Windows 8.0, there wasn't a way to control this. In Windows 8.1, the Windows.System.Launcher API--namely the LaunchFileAsync and LaunchUriAsync methods that take a LauncherOptions argument--added support for the LauncherOptions.DesiredRemainingView property. This gives you the kind of control you're looking for here--in your scenario you'd want to use the value ViewSizePreference.UseMinimum in the DesiredRemainingView property.
I have a Windows Mobile application developed with Visual Studio 2010 and C# (Smart Device Project). When I run the application there's a start menu bar visible on the top and keyboard bar on the bottom. How can I make my application run in full-screen mode?
If possible I would like to have a solution that will allow me to turn full-screen mode on and off on runtime (after clicking some form button for example).
(Assuming the question is about Windows Mobile and not Windows Phone.)
On Windows Mobile if you want to hide parts of Windows that normally can't be hidden, you have to hide them with P/Invoke. There are plenty of questions like this already answered and some other resources too. And of course you can call the P/Invoke from an event handler.
Is it possble to Modify the Window's Login screen and add our own buttons/links? For example is it possible to do something like this?
alt text http://www.allaboutmoss.com/wp-content/uploads/2010/04/windowsxp_login.jpg
The above screen has a link and when clicked it should start a win forms application?
For Windows XP, you can build a GINA DLL, and for Vista+ you need to use the new credential providers system. In both cases, you basically have to build the UI from scratch and so it's not really possible to just take the existing UI and add a few controls here and there.
Of course, you could build your own GINA DLL that displays UI that's the same as the standard Windows XP one, with your own additions, but it's not exactly a simple task.
I want my application (written in c#) which needs to run on Windows 7 and show an icon in the notification area. The default is "only show notification" I my icon to be shown by default. looking for the api in c# or to wite a script for this.
If there's no direct way to do this is there any overriding way?
I believe it is by design the Windows 7 doesnt let you do this programmatically.
Could you not do something on the main TaskBar using the Windows API Code Pack?