0

Possible Duplicate:
Show a winform over the notification area

I'm working on a Windows application where I have to display notification alerts to the user. The notification should pop up from the bottom right of the screen above the taskbar, how could I do that? Are there any general solutions?

I tried the solution at http://www.codeproject.com/Articles/2562/Taskbar-Notification-dialog but it's for a custom dialog, whereas I need to show a normal Form.

Community
  • 1
  • 1
Nitish Katare
  • 1,147
  • 2
  • 12
  • 22
  • What have you tried yet? Here is a hint: SystemInformation.VirtualScreen.Width SystemInformation.VirtualScreen.Height – Daniel Abou Chleih Jan 11 '13 at 07:42
  • I tried with below link but its a custom page but i need to show normal form with pop up effect. http://www.codeproject.com/Articles/2562/Taskbar-Notification-dialog – Nitish Katare Jan 11 '13 at 07:45
  • @rapsalands It probably will, but it definitely shouldn't: http://meta.stackexchange.com/questions/23321/is-it-appropriate-to-comment-on-peoples-accept-rate =) – J. Steen Jan 11 '13 at 07:46
  • Then create a form, set you location(Desktopwidth-form.width/DesktopHeight-form.Height). – Daniel Abou Chleih Jan 11 '13 at 07:47

4 Answers4

2

Take a look at the NotifyIcon-Class, you can create a icon at the taskbar wich can show a BalloonTip ;)

Vloxxity
  • 980
  • 1
  • 9
  • 30
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes, however unlikely that is with the MSDN docs. =) – J. Steen Jan 11 '13 at 07:55
  • 2
    @J.Steen: The last part of your comment is the important bit. What should this guy do; copy and paste the entire class documentation? This is the best answer – Ed S. Jan 11 '13 at 08:00
  • @EdS. No, that's not what I'm suggesting - the answerer should quite possibly write a very brief, working example, or point out bits of code that are important to OPs solution. Self contained answers and questions are preferred, after all - and a well crafted answer will get rather a lot of upvotes, in my experience. – J. Steen Jan 11 '13 at 08:01
  • 2
    @J.Steen: I know what you're getting at, but sometimes the answer is "here is the class which was designed to solve your problem". Honestly, if the OP is unable to read the documentation and use the class then they need to get back to the basics. – Ed S. Jan 11 '13 at 08:03
  • @EdS. And I'd include a brief sample just for the look of things, anyway. It's not required, it's simply *better*. =) – J. Steen Jan 11 '13 at 08:04
  • Besides, this may not satisfy the OP, as they required a "normal form", and that suggests to me that a balloon popup is not enough. But let's hope it is. – J. Steen Jan 11 '13 at 08:05
  • @J.Steen with normal form i understood he would like to have something like this:http://t2.gstatic.com/images?q=tbn:ANd9GcQUXr692BpjagBW5240kKvJBBvcj4rDEqOm4RXD2PtwQpFjSfKh3DvbazbT instead of this (like in his link):http://www.codeproject.com/KB/dialog/TaskbarNotifier/TaskbarNotifier.jpg – Vloxxity Jan 11 '13 at 08:10
  • +1, any which way. Like I said, let's hope. The OPs requirement isn't immediately clear. =) – J. Steen Jan 11 '13 at 08:11
2

Create your form(In case I understood your question right and you want to use a form) and set use this method to slide your form up (at the position of your taskbar)

public void Animate()
    {
        this.Location = new Point(SystemInformation.VirtualScreen.Width - this.Width, SystemInformation.VirtualScreen.Height);
        for (int i = 0; i < this.Height; i++)
        {
            this.Location = new Point(SystemInformation.VirtualScreen.Width - this.Width, SystemInformation.VirtualScreen.Height - i);
        }
    }
Daniel Abou Chleih
  • 2,440
  • 2
  • 19
  • 31
1

You have to find the working area height and width and set form location to this.Check below link it will help you

link

Community
  • 1
  • 1
Prasanth V J
  • 1,126
  • 14
  • 32
0

There is a one control in Toolbox i.e notifyIcon it is displaying all information in BaloonTip Format. like this

notifyIcon1.ShowBalloonTip(100, "Grab Status", "Location-" +  dsAutoSeachCriteria.Tables[0].Rows[autoRowCount][0].ToString() + Environment.NewLine + "New Records-" + newurls + Environment.NewLine + "Old Records-" + oldurls, ToolTipIcon.Info);
anu
  • 1