Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

SHQueryUserNotificationState (shell32)
 
.
Summary

C# Signature:

[DllImport("shell32.dll")]
static extern int SHQueryUserNotificationState(
     out QUERY_USER_NOTIFICATION_STATE pquns);

VB Signature:

Declare Function SHQueryUserNotificationState Lib "shell32.dll" (TODO) As int

User-Defined Types:

enum QUERY_USER_NOTIFICATION_STATE
{
     QUNS_NOT_PRESENT = 1,
     QUNS_BUSY = 2,
     QUNS_RUNNING_D3D_FULL_SCREEN = 3,
     QUNS_PRESENTATION_MODE = 4,
     QUNS_ACCEPTS_NOTIFICATIONS = 5,
     QUNS_QUIET_TIME = 6
};

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

void Main()
{
    Console.WriteLine("user notification state: {0}", QueryUserNotificationState.State());    
}

// Define other methods and classes here
class QueryUserNotificationState
{
    public enum UserNotificationState
    {
        NotPresent = 1,
         Busy = 2,
         RunningDirect3dFullScreen = 3,
         PresentationMode = 4,
         AcceptsNotifications = 5,
         QuietTime = 6
    };

    [DllImport("shell32.dll")]
    static extern int SHQueryUserNotificationState(out UserNotificationState pquns);

    public static UserNotificationState State()
    {
        UserNotificationState state;
        var returnVal = SHQueryUserNotificationState(out state);

        return state;
    }
}

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions