-1

I am writing a simple chat program that works over FTP that is refreshing a page into a text box. I want a notification icon with text showing up that there is a new message.

Does anyone have a good way/trick? I really feeling bad about this, I am trying for days now... It should be something like this: if textbox1.textchanegd then notifycationicon1.show("Hey! A new message from...")

Neeku
  • 3,646
  • 8
  • 33
  • 43
berm
  • 27
  • 9
  • 1
    This is answered here I believe: http://stackoverflow.com/questions/15215716/how-to-show-a-message-with-icon-in-notification-are-using-c-sharp?s=5|0.6972 – JoelC Nov 03 '14 at 22:12

1 Answers1

0

Assuming that your notification icon is showing up, it could be as simple as:

NotifyIcon1.ShowBalloonTip(5000, "New Message", "Hey! A new message from...", ToolTipIcon.Info)

If your notification icon is not showing up at all, then make sure you have the Icon property set.

Mark
  • 8,140
  • 1
  • 14
  • 29
  • Hey! Thank you for your reply! But that's not exeactly what I meant... it has to show up when someone in the chat sends a message. Like: if textbox2.textchanged then NotifyIcon1.ShowBalloonTip(5000, "New Message", "Hey! A new message from...", ToolTipIcon.Info) But that does not work! :'( – berm Nov 04 '14 at 11:02
  • @berm So, is your question actually about showing a tool tip, or is it about determining if the text in `textbox2` has changed? `TextChanged` is an event you could handle (the same way as a button click, etc.), but that would usually be used to determine when the user has typed into the box. In your case, it sounds like you want to trigger the notification when a new chat message arrives, and at that time presumably you have code to update the text box, so can't you just trigger the message in that code? Need more info about what your problem really is. – Mark Nov 04 '14 at 14:01
  • Yes exactly it's about a reaction at the moment a new message arrives! and that should be a balloon-tip, but how? My concept is: Program goes to page (.txt) and loads it into textbox every 1000 milliseconds > user need to know that there is a new text, but how? Best regards! – berm Nov 04 '14 at 21:43
  • @berm When your code downloads the new `.txt` file, compare it with the current text and notify the user if it's different? Perhaps you should ask a new question with you actual problem? – Mark Nov 05 '14 at 05:27
  • perhaps indeed... Thank you for your time and advice, best regards berm – berm Nov 06 '14 at 07:33