Aug 01, 2015 'Windows is activated' indicates that everything went well. Using the System Control Panel applet. This one is a lot quicker and delivers the same result. Use the keyboard shortcut Windows-Pause to open the System Control Panel applet. It lists the activation status of the operating system under 'Windows activation' at the bottom of the screen. Notification – a message displayed to the user outside of the app's normal UI (i.e., the browser) Push Message – a message sent from the server to the client; Push Notification – a notification created in response to a push message; Notifications API – an interface used to configure and display notifications to the user.
The notification area is a portion of the taskbar that provides a temporary source for notifications and status. It can also be used to display icons for system and program features that have no presence on the desktop, such as battery level, volume control, and network status. The notification area has been known historically as the system tray or status area.
This topic contains the following sections:
Notification and Notification Area Guidelines
See the Notifications and Notification Area sections of the Windows User Experience Interaction Guidelines for best practices in the use of notifications and the notification area. The goal is to provide user benefit through appropriate use of notifications, without being annoying or distracting.
The notification area is not for critical information that must be acted on immediately. It is also not intended for quick program or command access. As of Windows 7, much of that functionality is best accomplished through an application's taskbar button.
Windows 7 allows a user to suppress all notifications from an application if they choose, so thoughtful notification design and use will incline the user to allow your application to continue to display them. Notifications are an interruption; ensure that they are worth it.
Windows 7 introduces the concept of 'quiet time'. Quiet time is defined as the first hour after a new user logs into his or her account either for the first time or for the first time after an operating system upgrade or clean installation. This time is set aside to allow the user to explore and familiarize themselves with the new environment without the distraction of notifications. During this time, most notifications should not be sent or shown. Exceptions include feedback that the user would expect to see in response to a user action, such as when he or she plugs in a USB device or prints a document. API specifics of regarding quiet time are discussed later in this topic.
Creating and Displaying a Notification
The remaining sections in this topic outline the basic procedure to follow to display a notification from your application to the user.
Add a Notification Icon
To display a notification, you must have an icon in the notification area. In certain cases, such as Microsoft Communicator or battery level, that icon will already be present. In many other cases, however, you will add an icon to the notification area only as long as is needed to show the notification. In either case, this is accomplished using the Shell_NotifyIcon function. Shell_NotifyIcon allows you to add, modify, or delete an icon in the notification area.
When an icon is added to the notification area on Windows 7, it is added to the overflow section of the notification area by default. This area contains notification area icons that are active, but not visible in the notification area. Only the user can promote an icon from the overflow to the notification area, although in certain circumstances the system can temporarily promote an icon into the notification area as a short preview (under one minute).
Note
Windows Is In Notification Period Calendar![]()
The user should have the final say on which icons they want to see in their notification area. Before installing a non-transient icon in the notification area, the user should be asked for permission. They should also be given the option (normally though its shortcut menu) to remove the icon from the notification area.
The NOTIFYICONDATA structure sent in the call to Shell_NotifyIcon contains information that specifies both the notification area icon and the notification itself. The following are those items specific to the notification area icon itself that can be set through NOTIFYICONDATA.
Each icon in the notification area can be identified in two ways:
Icons in the notification area can have a tooltip. The tooltip can be either a standard tooltip (preferred) or an application-drawn, pop-up UI. While a tooltip is not required, it is recommended.
Notification area icons should be high-DPI aware. An application should provide both a 16x16 pixel icon and a 32x32 icon in its resource file, and then use LoadIconMetric to ensure that the correct icon is loaded and scaled appropriately.
The application responsible for the notification area icon should handle a mouse click for that icon. When a user right-clicks the icon, it should bring up a normal shortcut menu. However, the result of a single click with the left mouse button will vary with the function of the icon. It should display what the user would expect to see in the form best suited to that content—a popup window, a dialog box or the program window itself. For instance, it could show status text for a status icon, or a slider for the volume control.
Windows Is In Notification Period 1
The placement of a popup window or dialog box that results from the click should be placed near the coordinate of the click in the notification area. Use the CalculatePopupWindowPosition to determine its location.
The icon can be added to the notification area without displaying a notification by defining only the icon-specific members of NOTIFYICONDATA (discussed above) and calling Shell_NotifyIcon as shown here:
![]()
You can also add the icon to the notification area and display a notification all in one call to Shell_NotifyIcon. To do so, continue with the instructions in this topic.
Define the NOTIFYICONDATA Version
As Windows has progressed, the NOTIFYICONDATA structure has expanded to include more members to define more functionality. Constants are used to declare which version of NOTIFYICONDATA to use with your notification area icon, to allow for backward compatibility. Unless there is a compelling reason to do otherwise, it is strongly recommended that you use the NOTIFYICON_VERSION_4 version, introduced in Windows Vista. This version provides the full available functionality, including the preferred ability to identify the notification area icon though a registered GUID, a superior callback mechanism, and better accessibility.
Set the version through the following calls:
Note that this call to Shell_NotifyIcon does not display a notification.
Define the Notification Look and Contents
A notification is a special type of balloon tooltip control. It contains a title, body text, and an icon. Like a window, it has a Close button in its upper right corner. It also contains a Options button that opens the Notification Area Icons item in the Control Panel, which allows the user to show or hide the icon or show only notifications without an icon.
The NOTIFYICONDATA structure sent in the call to Shell_NotifyIcon contains information that specifies both the notification area icon and the notification balloon itself. The following are those items specific to the notification that can be set through NOTIFYICONDATA.
Note
The IUserNotification and IUserNotification2 interfaces are Component Object Model (COM) wrappers for Shell_NotifyIcon. However, at this time, they do not provide the full NOTIFYICON_VERSION_4 functionality available through Shell_NotifyIcon directly, including the use of a GUID to identify the notification area icon.
Check the User Status
The system uses the SHQueryUserNotificationState function is used to check whether the user is in quiet time, away from the computer, or in an uninterruptable state such as Presentation mode. Whether the system displays your notification depends on this state.
Note
If your application is using a custom notification method that does not use Shell_NotifyIcon, IUserNotification, or IUserNotification2, it should always explicitly call SHQueryUserNotificationState to determine whether it should display notification UI at that time.
Notifications sent when the user is away are queued for display, but because you cannot know when the user will return or whether the notification will still be valid at that time, you might consider resending the notification later.
Notifications sent during quiet time are discarded unshown. Design guidelines ask that all notifications be ignorable. They should not require immediate user action. Therefore, no notification is so important that it should override quiet time.
Display the Notification
Once you have set the NOTIFYICONDATA version and defined the notification in a NOTIFYICONDATA structure, call Shell_NotifyIcon to display the icon.
The following code shows an example of setting NOTIFYICONDATA data and sending it through Shell_NotifyIcon. Note that this example identifies the notification icon through a GUID (preferred in Windows 7).
Removing an Icon
To remove an icon—for instance, when you have only added the icon temporarily to broadcast a notification—call Shell_NotifyIconas shown here. Only a minimal NOTIFYICONDATA structure that identifies the icon is needed in this call.
Note
When an application is uninstalled, its notification area icon can still appear to the user as an option in the Notification Area Icons page in the Control Panel for up to seven days. However, any changes made there will have no effect.
SDK SampleAccessing Windows In Notification Period
See the NotificationIcon Sample sample in the Windows Software Development Kit (SDK) for a full example of the use of Shell_NotifyIcon.
Event Id 4105 Windows Is In Notification PeriodRelated topicsComments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |