I want to display the statistics of my application from the system tray, when the user focuses the application's system tray icon. To achieve this, I used Shell_NotifyIcon(), but it has the limitation of max string size of 64 chars.
So, I created my own tooltip window using "CreateWindow()" (I am using Win32 APIs), and it works fine when I hover the mouse over the icon. But it doesnt work when systray icon is focussed using only keyboard.
When I debugged the app, it appeared that there were no windows-messages captured when icon was focussed using keyboard. But I get WM_MOUSEMOVE messages when I hover the mouse over the icon.
Are there any windows-messages sent out when systray icons are focused using keyboard (i.e Win+B --> use arrow keys to navigate to your icon)?
Any alternate suggestions would be appreciated.
Thanks,
Kunal
A System Tray icon tooltip is limited to 64 characters only on Windows versions prior to Windows 2000. In Windows 2000, the tooltip limit was increased to 128 characters.
And there are messages when the icon is focused/activated via keyboard. You may have to ask the System Tray for them via NIM_SETVERSION.
Read the documentation:
Notifications and the Notification Area
Shell_NotifyIcon(). There is a lot of information about handling keyboard/mouse messages in the Remarks.
Related
I have an AltecLansing ALBM7444 wired mouse with scroll wheel, button behind that and two side buttons. I cannot set any of the buttons, though one of the side buttons opens Spotlight, which I do not need. NO help from Altec and the Mac mouse system preferences have been dumbed down down to match Apple's pathetic product. Is there any way to set those button actions?
qApp->setOverrideCursor() method works successfully, if I want to hide mouse cursor, except one condition. If I add a dialog that is modal, and while it is shown, if the cursor is out of dialog's borders, it is shown again. Have you got any idea about the problem?
It does not matter how the solution for hiding mouse cursor is; whether by Qt or at the operating system level. My operating system is Windows 7.
You cannot hide the mouse cursor when it leaves your window (or dialog-window), because it is then handled by the window-manager of your OS. A workaround would be to constrain the mouse to your window/dialog, so it cannot leave. You will either need to look through the MSDN to find the specific windows functions to do it, or do it like in kshegunov's code example on the Qt-forums: https://forum.qt.io/topic/61832/restrict-mouse-cursor-movement/12
I have been building a .net application in c# for Windows CE. I had originally created it for a Motorola WT4090 which runs Windows CE 5. I have now got a Motorola WT41N0 that runs Windows Embedded Compact 7. When I run the application on the WT41N0 with Windows Embedded Compact 7 the on-screen keyboard displays automatically when a text box is selected. This did not happen on the WT4090 under Windows CE 5. I do not want the on-screen keyboard to display automatically unless I have specifically coded it to.
Does anyone know how I can stop the on-screen keyboard from automatically displaying when a text box is selected?
The on-screen keyboard will automatically display when a text box is selected based on the registry setting (dword) HKEY_CURRENT_USER\ControlPanel\SIP\TurnOffAutoDeploy. If this is set to 0 then the on-screen keyboard will automatically display. If it is set to 1, it will not. To fix this problem you can edit the registry setting. If you are using a Motorola device you can create a file in the \Application directory with a .reg extension which contains the following:
[HKEY_CURRENT_USER\ControlPanel\SIP]
"TurnOffAutoDeploy"=dword:1
If you don't want to see the on-screen keyboard to appear at all (as in the case where you have a regular keyboard), then take away the "Software Input Panel" settings from the "User Interface" settings in your OS Design.
Looking for a solution to a hidden window - either a windows event that occurs when the TaskBar Icon is clicked.
or alternatively, a way to remove the TaskBar Icon. The Tray Icon is easily hidden - that is not the problem.
There is a sample script on the AutoHotkey's Website called Minimize Window to Tray
The script itself uses the hotkey Win+H to hide the active window. Win+U then shows the last hidden window. If this is not the functionality you are going for, I'm sure you can take a look at the script and pick out what you need. Hope this helps you out.
I've a possible answer to detecting a Click on the TaskBar Icon - but I'm concerned it will differ for each version of Windows. Using OnMessage(Wm_Activate := 0x06, "testmessage") - then MouseGetPos to get the Window name, I can eliminate all but 'MSTaskListWClass1' the name of the Icon I want. But I suspect that the name is only valid for Win7.
Is there a way to make the taskbar item flash in an AIR app? like it does in other applications to alert the user of a change.
Thanks!!
You need to call:
stage.nativeWindow.notifyUser(NotificationType.CRITICAL);
Just to put some more info, the notification types that can be used here are:
NotificationType.CRITICAL: the window icon flashes until the
user brings the window to the foreground.
NotificationType.INFORMATIONAL: the window icon highlights by changing color.
There's an article on livedocs about using Taskbar here