internal static extern int CeSetUserNotificationEx(int hNotification, UserNotificationTrigger lpTrigger, UserNotification lpUserNotification);
internal static extern bool CeGetUserNotificationPreferences(IntPtr hWndParent, UserNotification lpNotification);
internal static extern int CeSetUserNotification(int hNotification, string pwszAppName, ref SYSTEMTIME lpTime, UserNotification lpUserNotification);
public static int SetUserNotification(string application, DateTime time, UserNotification notify) { return SetUserNotification(0, application, time, notify); }
public static int SetUserNotification(int handle, string application, DateTime time, UserNotification notify) { SYSTEMTIME lpTime = SYSTEMTIME.FromDateTime(time); int num = NativeMethods.CeSetUserNotification(handle, application, ref lpTime, notify); if (num == 0) { throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification"); } return num; }
public static UserNotification GetUserNotificationPreferences(IntPtr hWnd, UserNotification template) { template.MaxSound = 260; template.Sound = new string('\0', 260); if (!NativeMethods.CeGetUserNotificationPreferences(hWnd, template)) { throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not get user preferences"); } return template; }
public static int SetUserNotification(int handle, UserNotificationTrigger trigger, UserNotification notification) { int num = NativeMethods.CeSetUserNotificationEx(handle, trigger, notification); if (num == 0) { throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification"); } return num; }
public static UserNotification GetUserNotificationPreferences(IntPtr hWnd) { UserNotification template = new UserNotification(); return GetUserNotificationPreferences(hWnd, template); }
public static int SetUserNotification(int handle, string application, DateTime time, UserNotification notify) { SYSTEMTIME lpTime = SYSTEMTIME.FromDateTime(time); int num = NativeMethods.CeSetUserNotification(handle, application, ref lpTime, notify); if (num == 0) { throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification"); } return(num); }
public static int SetUserNotification(string application, DateTime time, UserNotification notify) { return(SetUserNotification(0, application, time, notify)); }
public static int SetUserNotification(int handle, UserNotificationTrigger trigger, UserNotification notification) { int num = NativeMethods.CeSetUserNotificationEx(handle, trigger, notification); if (num == 0) { throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification"); } return(num); }
public static UserNotification GetUserNotificationPreferences(IntPtr hWnd) { UserNotification template = new UserNotification(); return(GetUserNotificationPreferences(hWnd, template)); }