I am creating my personal gmail checker in C# and I need a way to popup a notification in system tray whenever there is a new email and how to control the contents of that notification bar. Also if possible I don't need it to be like windows notifications but my personal way. For example not popup like a notification but like a rectangle (or square or whatever) and if windows taskbar is in autohide the taskbar not be shown but only the notification. Also it is a wpf app. If you need more info let me know
Sounds like you're looking at trying to create a "toaster"-style popup. You can take a look at including something like this WPF NotifyIcon:
This is an implementation of a NotifyIcon (aka system tray icon or taskbar icon) for the WPF platform. It does not just rely on the Windows Forms NotifyIcon component, but is a purely independent control which leverages several features of the WPF framework in order to display rich ToolTips, Popups, context menus, and balloon messages. It can be used directly in code or embedded in any XAML file.
You could also look at using a notification framework like Growl for Windows:
Ok, so what is Growl?
Put simply, Growl lets you know when things happen. Files finished downloading, friends came online, new email has arrived - Growl can let you know when any event occurs with a subtle notification. The rest of the time, Growl stays out of your way.
Along with letting you know when things happen, Growl also gives you full control over how you are notified and what action (if any) you want to take in response to the notification. You can choose to be alerted with a visual indicator or an audible alert, both, or neither. You can choose the type of display that is shown, whether the display remains on the screen, the importance of the notification, and even if the notification should be forwarded to another computer. You can have notifications that trigger an email, run a script, launch a program, or are read out loud.
You can find the documentation and Growl.net files on Growl's developer page.
Related
I have an app that currently shows a message box when the users saves that just says "Saved successfully". The problem is, user's tend to save frequently when using this app and the message box is a pain in the #$$. I'd like to have a little notification box that fades in and out and doesn't require user interaction, kind of like how Growl notifications work on a Mac.
Is there any .net library or free 3rd party application that does something like this?
There is no need to use 3rd party libraries for something like this.
Crate a form for your notifications, styled as you wish.
When you need to notify, you can Show the form - to fade it in and out use the Opacity property (using a timer to animate the changes).
Have a look at this and see if it does what you want.
Office 2003-like popup
I have a list of items in a listview and when the user double-clicks an item, I display a messagebox with the contact's name and address.
My boss doesn;t like it because he thinks this violate some UI design principle for Windows Mobile devices. I can't find anything that prohibits this. He is thinking that it has something to do with the device not being able to go into power-saving mode when a message-box is displayed.
Is he right? Can you suggest an alternative (he doesn;t have an alternative except he doesn;t like what i have)
C#, Windows Mobile 6.0, WinForms
Windows Mobile 6 uses MessageBox all the time. It is probably better than rolling your own solution because you'll automatically benefit from updates in WM6.5 which a custom solution wouldn't.
The device has no problem going into power-saving mode while a message box is displayed. Other options available to you include using a tabbed view and switching to another tab to display details, or creating and displaying a new form to display details.
i have a C# app that registers a protocol. When you click BLAH://djfhgjfdghjkd in a browser it launches my app. However you can click multiple links and each link is a note added into the app.
How can i inform the user that he did fully click the link? Right now i have a console app showing up for 1sec (basically pops up and goes away as fast as possible) which felt better then a hidden console since you are unsure if it went through. The 1 second takes a lot of time when you are trying to rapidly click many notes/links and the console gets in the way. What can i do that is noticeable?
I'm thinking have a box that comes up (and is semi transparent) but the click passes through it. Maybe there is a better way? Also i wouldnt know where to start with transparent windows or pass through clicks
I'd look at putting an icon in the SysTray, combined with balloon tips, that's the Windows way I think. Especially since it's even been renamed to the Notification Area.
Look at the NotifyIcon Class.
Surfing the net, I came across this:
this code that shows how to display a notification at the bottom of the screen on a Windows Mobile device. My question is, is there a way to either specify which options are displayed beneath the notification (on the taskbar) or is there a way to detect when the user clicks on the notification itself, so that I can react to that programmatic ally.
With this specific API, the key is in the SHNOTIFICATIONDATA's hwndSink member. When the notification is clicked, the hwnd you pass in here will get the click message. For this it's simplest to pass in a MessageWindow's handle.
You might also look at the CeSetUserNotification API instead. It's actually quite a bit more robust in what it allows you to do and how you can get notifications back at the app.
How would one go about displaying taskbar notifications?
I want to write an app that periodically displays a flash card esque notification, the intention is to see if a 5 second or so distraction every hour can help with language learning.
In .NET you can use the Notification Icon to place a notification in the system tray.
For the application you describe, I probably wouldn't use a notification icon or taskbar icon. You'll likely need a larger window displayed, with larger font.
I'd open a frameless window (possibly faded or scrolled into view) that sits in the lower-left of the desktop. (Although of course remember that not everyone has the taskbar at the bottom of the screen).
As an example, look at what Outlook or many RSS readers do to notify of new messages - this feature is commonly called a "toast" pop-up.