In my WPF application, I had to set a systray icon. It's a business application which will be used every days.
In win 7(maybe vista, i don't know), Some icons can be hidden, displayed only when notifications, always displayed. Is it possible to indicate directly that my systray icon has to be always displayed? Otherwise, my customer will have to set this on every workstation it installs this program
Thank you!
This is not supported. You can see Raymond thoughts on this.
Related
Is there any way to completely disable the taskbar in Windows 10 Home? I have a C# app that I want to display fullscreen on clients' displays without any sign of it running on Windows. It's supposed to run on startup and display a website.
I created a setup that changes most of the Windows settings via registry, like hiding desktop icons and altering logon view, but the taskbar remains visible. Auto hide doesn't satisfy me, because after the system boots the taskbar is still visible until you actually click somewhere on the desktop, and it takes a while for my app to run. I'd really appreciate some help.
When explorer is running, there taskbar will always be visible in some kind (even if it's a small border).
If you want to achieve something like a digital signage solution, you may replace the shell. Changing the shell will also provide some other benefits (most popups / balloontips won't occur anymore).
Be aware that this configuration is effective for all users on the system.
Path to the shell is available at
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Shell
Update:
Just to hightlight:
It is indeed possible to have custom shells per user (see comments).
This is done by specifying a custom location of the shell path that is located in the registry for a given user.
Yes, you can totally disable the taskbar in Windows 10 but it is only temporary until you hover your mouse around the taskbar area.
Here's a tutorial: how to hide the taskbar in Windows 10
we would like to build a screensaver that shows the desktop and the running applications but prevents user input by showing the login screen. The idea was to build a windows app with no window or a transparent window. However, as soon as the screensaver gets activated the desktop and all applications are hidden from the screen.
Is it possible to start the screensaver without hiding the desktop?
Thx,
bja
Is it possible for you to implement this as something other than a screensaver? I'm assuming that the Windows API does have a method that allows you to tell how long the computer has been idle (otherwise, how does the stuff that manages screensavers do it?), so if you use that you could just set up your application such that it's continuously running as a background process, and will pop up a modal dialog box (or your idea of a transparent window) or something that prompts for the user's login info when the computer has been idle for a certain amount of time.
Why can't you just grab an image of the screen when the SS kicks off. Then use that as the backdrop of your SS.
Vista has a bubbles screen saver that just starts putting bubbles on the screen. Not sure how they do it.
You are better off just creating a full-screen application with a transparent window that starts up on a timer like a screensaver. The screensaver functionality while similar to what you are doing, functions much differently.
As an alternative suggestion, you could always use a service (or background app) to gather the information you want these monitoring tools to display, or even just to grab periodic screenshots of the (hidden) desktop, and then have your screensaver query that app to get the data it needs to display.
That way, you get the benefit (the secure desktop, the usual Windows login sequence, etc.) of a screensaver, but still get to display what you need to.
I have a .NET application (C#, WinForms) application running on Windows XP. If i minimize my application, and have several other windows minimized to the taskbar, and click on my application (in the taskbar) then often i see the taskbar "icon" blink but my application fails to "restore" its window. Any suggestions to what might cause this? Any hints on how to check if my application is not getting an event from the mouse-click.
UPDATE: Could anybody give an example of, how to output any incoming events to an application. Something that allows me to e.g. print the received events using Console.Writeline() to see, if my application gets an event when I click on the taskbar?
http://www.catch22.net/software/winspy-17
I venture to guess that your app will become in focus.
AFAIK this should not have anything to do with your application. Is there any other application running which always remains on top?
You dont handle maximising and minimising to and from the taskbar in your app. That is to say you dont have to. Windows deals with this and so this would appear to be in no way related to your app not handling an event, rather Windows doing something (or not doing something).
I wan't to customize the icon displayed within the windows 7 taskbar.
When my app is running, I can do it by changing main window icon but, when the app is pinned, the exe's icon is displayed.
How can I set the taskbar icon for my app to an icon different from the one embedded within the exe ?
Not tried, this solution may work but looks dirty.
Edit :
Our app is compiled once but depending on config file, features are enabled or not so it's a product or another. We do not want to compile one exe for each product.
The solution above may not work as many instances of my app can be installed in different pathes (so you end up with the same exe file name but different icons!), is this registry key poorly designed or am I missing something?
EDIT The info below is a bit obsolete; all new Windows 7 bits are now available as a managed API, available here: http://code.msdn.microsoft.com/WindowsAPICodePack
There is a series of articles on the new Taskbar API by the debugging guru Sasha Goldshtein. You should have a look at the Overlay Icons and Progress Bars API.
You can download the sample code from Windows 7 Taskbar Developer Resources on Microsoft Code. What you're looking for is the IMClient sample:
The IMClient sample demonstrates how
taskbar overlay icons and taskbar
progress bars can light up an
application’s taskbar button instead
of relying on an additional dialog or
on an icon in the system notification
area (tray).
(source: microsoft.co.il)
(source: microsoft.co.il)
(source: microsoft.co.il)
I believe this should help you achieve what you want.
When you pin an application to the TaskBar, it simply creates a shortcut in the following directory:
C:\Users\<User Name>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
You should be able to identify where the shortcut is (ie, get KnownFolders and work from there. UserAppData should be the one), and then using P/Invoke (IShellLink), you can alter the icon that the shortcut is setup to use. The machine might need a reboot for this to take effect, but it should work.
If you hold down Shift while right-clicking on the pinned application, and select Properties, you can see the Change Icon button for the shortcut. This is basically what you need to emulate with code.
All of these things can definately be done with code, but whether you think they're any better than the registry setting is up to you.
You can do this by using the library called "Windows 7 Bridge" which is based on the "Windows Vista Bridge".
These are managed wrappers around all the Vista and Windows 7 native functions.
More info can be found here
I don't know if I'm understanding your problem but..
If you create an application and put the icon property of the main window, that icon will appear in the taskbar also. But, if you pin-it to the taskbar, that icon dissapear. Am I right? If so, go to the project properties and in the application tab, put the icon that you want for the exe. Now, you will see that icon in the taskbar when pinned.
I Use the same icon for both things :P
As far as I can tell, for some reason you can't change the icon for a program that's already pinned to the taskbar. To do it, just unpin the program, locate it in the start menu, right click - properties - change icon. then re-pin it to the taskbar, and it will have the new icon!
Have a look at this blog. He does a series of blog posts about programming the Windows 7 taskbar, so maybe that will point you in the right direction.
I can't test this right now unfortunately, but perhaps just creating a regular, good old shortcut might solve the problem? Create a shortcut to the app, change the icon, then pin the shortcut instead of the app itself?
Will check when I can next get access to my Windows 7 machine...
Right click on the pinned icon, in the popup you see the programs title, there right click again and go to properties. There you are able to change the icon by clicking on the button
"change icon". For me it needed a reboot to finish the changes.
If you want to have a shortcut in the taskbar that goes directly to somewhere useful, such as your "My Documents" directory. The easy fix . . .
Drop a folder into the taskbar ( which creates a shortcut to images ). Navigate to the directory where that shortcut was placed, right click on the shortcut and select "properties" to change the target. Select the "general" tab to change the name of the shortcut. The shortcut was placed here:
C:\Users[user]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
You can navigate to this directory and edit the properties of the "images" shortcut.
I have a fullscreen window, and I want to prevent pop up windows that appear at the right bottom corner of my screen. I set the Topmost property to true, but apparently it does not help. I also tried activating the form and giving it the focus once it got deactivated, but that did not help either. What is a way to ignore such windows while the user is engaged with the fullscreen app? I am .NET programming in C#.
You can't do it, this fails the "what if two programs tried to do this" test:
those popups are just normal windows like yours, they also use the same top-most style you are using.
if there was a way to always be above other topmost windows they would have used it too rendering it useless (because the authors of the other apps are just as concerned about the user missing their "super important" notifications as you are about them interfering with your full screen app).
You can try and play dirty tricks to force your window to the top of the top-most z-order, but those popups are likely to use the exact same tricks, again making this all useless (and as an extra bonus all those dirty tricks can turn your app into a compatibility nightmare).
You can disable these balloon notifications using these steps:
Click Start, Run and type regedit
Navigate to the following subkey:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
In the right pane, create a DWORD value named EnableBalloonTips
Double-click the new entry, and give it a value of 0.
Quit Registry Editor.
Log off Windows (this is not very cool...), and then log back on for the changes to take effect.
if you need help in how doing this by program, don't hesitate to ask ;)
I don't think that you can block all the popups, windows might not let you do that. But you can try with SetWindowPos function and pass it HWND_TOP parameter. It might work a little better than Topmost = true.
I used a sys tray popup control on my personal project SvnRadar written in WPF.
The control is at the http://www.hardcodet.net/projects/wpf-notifyicon written by Philipp Sumi.
Very nice.Only thing you will be need to "detach" it from the SysTray screen coordinates and
make it appear where you wish.
Hope it helps.
Good luck.