Page 1 of 3 123 LastLast
Results 1 to 40 of 98

Thread: MSN Messenger Style Systray Notification Messages

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    MSN Messenger Style Systray Notification Messages

    UPDATED 10th March 2005

    I have developed a fully functional, fully customisable MSN Messenger Style systray notification system.

    Features:
    • Multiple popup messages
    • Scrolling direction, Up, Down, Left or Rigth
    • Sticky Messages
    • Display inside app or picbox by setting parent to containers hWnd
    • Click message to hide it
    • Message in front of all other windows
    • Smooth scrolling
    • Custom background picture
    • Custom Logo
    • Custom Message
    • Custom Caption
    • Custom Size
    • Play different sounds when showing message
    • Add progress bar to message (like Norton Anti Virus when it scans emails)
    • If no room is available to display message then it waits till another message hides 1st.
    • Change show time, scroll speed and movement increment.
    • Allow clickable messages which raise an event back to the UI.
    • Simple to use DLL. Easy to add functionality to any project.
    • Main app now keeps focus (Thanks to 86atc250r for the code)
    • Messages now able fade in and out
    • NEW: Detachable messages. Drag a message as a sticky desktop note.

    Download the project and run Test.vpg.

    Any comments most welcome.

    Woka
    Attached Files Attached Files

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    woka, very nice code. I have 2 suggestions for you...

    get a new hand icon for the mouseover on links... that thing looks like you pulled it from windows 3.11

    also, if the user has the mouse over the form region, you should set a flag to make the window drop, but not drop it until the mouse leaves the form region of the popup.. know what im saying.. likewise if the popup is scrolling off, and they mouse over.. it should return to its original state...

  3. #3
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Systray Notification Messages

    Quote Originally Posted by kleinma
    woka, very nice code. I have 2 suggestions for you...

    get a new hand icon for the mouseover on links... that thing looks like you pulled it from windows 3.11

    also, if the user has the mouse over the form region, you should set a flag to make the window drop, but not drop it until the mouse leaves the form region of the popup.. know what im saying.. likewise if the popup is scrolling off, and they mouse over.. it should return to its original state...
    Hmm seems like messenger, what purpose does this serve, reinventing the wheel ?

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    here is a better cursor.. give it a try
    Attached Files Attached Files

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    Quote Originally Posted by jhermiz
    Hmm seems like messenger, what purpose does this serve, reinventing the wheel ?
    I don't follow you?

  6. #6

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Systray Notification Messages

    Quote Originally Posted by jhermiz
    Hmm seems like messenger, what purpose does this serve, reinventing the wheel ?
    Hahahaha...yes...exactly like messenger You gibbering yanky doodle dandy
    All the code does is popup application notifications...like messenger, but that's all it has in common with messenger.
    It's a dll that you can add to any app that allows you to easily add notification messages. Very handy, and personally I think it's quite cool too, espescially the messages with a prog bar

    So...reinventing the wheel...I don't think so

  7. #7
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Systray Notification Messages

    Quote Originally Posted by Wokawidget
    Hahahaha...yes...exactly like messenger You gibbering yanky doodle dandy
    All the code does is popup application notifications...like messenger, but that's all it has in common with messenger.
    It's a dll that you can add to any app that allows you to easily add notification messages. Very handy, and personally I think it's quite cool too, espescially the messages with a prog bar

    So...reinventing the wheel...I don't think so

    But their are tools which do this, are you saying you need a reminder from what ??? From a task that you are assigned ? Theres tools fully integrated that do that, still cool to write the code though.

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    no i see how this could be useful on any number of apps to give you notification when a job is done or other progress... doesnt have to be just a messenger type of thing

    I wrote an app that COULD use this if I had not already implemented balloon tips instead.. just a little too late woka

  9. #9
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Systray Notification Messages

    Quote Originally Posted by kleinma
    no i see how this could be useful on any number of apps to give you notification when a job is done or other progress... doesnt have to be just a messenger type of thing

    I wrote an app that COULD use this if I had not already implemented balloon tips instead.. just a little too late woka
    Give me some examples of how this could be used ?

    Updating a db isnt a good one either, how do I run it from a sproc .
    And Im not going to use xp_cmdshell to run an exe to tell me an update is done.

    BTW a windows scheduled task is not a good example. Give me a good example of why I would put this to use ?

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    I have an application I wrote that interfaces with our CD duplicator... when a job is done a balloon tip pops up to let the user know the CD has finished burning and printing.. or if it fails it pops up saying that and the fail reason.. I could use this code instead of balloon tips if I wanted to, to give notification of progress to users...

  11. #11
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Systray Notification Messages

    I guess it depends on your needs.

  12. #12
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    doesn't any piece of code?

  13. #13
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Systray Notification Messages

    Anyone know if C# can register this type of dll ?

  14. #14
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    register or use? if its registered on the system via com, then you should be able to add a reference to it under the com tab in references...

  15. #15
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Systray Notification Messages

    Quote Originally Posted by kleinma
    register or use? if its registered on the system via com, then you should be able to add a reference to it under the com tab in references...
    I suspect if its a COM somehow it could be instantiated and called.
    I know with something like vb6 to dotNet not a biggie, one can just reference it and dim the object.

    But what about in this case...can I do:

    ObjWoka objW = new objW("Place this text");
    objW.Show();

    ?

    I'd assume he would have to make this some sort of native call from C# to this vb app ? Is that even possible ?

  16. #16

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Systray Notification Messages

    You couldn't do:
    Code:
    objWoka objW = New objW("Place this text");
    As my DLL was written in VB6, and this doesn't support:
    Code:
    New objW("Place this text")
    You would have to use:
    Code:
    objWoka objW = New objW;
    objW.Caption = "MSN Messenger"
    objW.Message = "jHermiz has just signed in. Run Away!"
    objMessages.Show objW
    Download the project and check it out. It will take a mere 30 seconds to test the app, then a further 10 seconds to compile the DLL.

    Woka

  17. #17
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Systray Notification Messages

    woka you should really port this code over to .net and make it a .net dll

  18. #18

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Systray Notification Messages

    One step at a time Batman

    Hahaha...am finishing work on some async downloading code.
    Then have some work to do on my LiveUpdate app.

    Then I will start converting the apps in my sig to .NET

    To be fair, this message notification DLL shouldn't be too hard at all to convert. The code for it is relatively easy.

    You wanna try converting this app. Intregued to see how you would do it

    Woka

  19. #19

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Systray Notification Messages

    New version.
    Download attachment from 1st post.

    New features include setting parent to be a picture box, or form.
    Ability to have sticky messages
    Click message to hide
    Message in front of all other windows
    Set x,y pos to be anywhere.

    New Demo UI.

    Let me know what you think.

    DemoUI code could be a little better, will tidy this up laters, but this code is only to demo the DLL functions, so it isn't that important.


    Woka

  20. #20

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Systray Notification Messages

    New version.
    Download from 1st post.

    Have added the ability to scroll in any direction, not just up.

    Messages can now scrool up, down left or right.

    Woka

  21. #21
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: MSN Messenger Style Systray Notification Messages

    Well you are welcome for the extra functions I told you too add....



    Very nice indeed. You are realy starting to be usefull around here. If you just knew a bit more about 3D programming you could soon start to call your self my friend.




    No seriously. This test app shows everything you realy want a pop up to do. Realy good. Love it.


    ØØ

  22. #22
    Hyperactive Member Steve Stunning's Avatar
    Join Date
    Jul 1999
    Location
    Fairfax, Virginia
    Posts
    314

    Re: MSN Messenger Style Systray Notification Messages

    Nice app. You have added some things that I had not thought of. I have created one as well but yours is much better.
    Steve Stunning

  23. #23

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    Thank you

    If you have any questions on the code then let me know.

    This app was designed to work with my systray icon code and my LiveUpdate auto updater software, both of which are in my sig.

    Woka

  24. #24
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: MSN Messenger Style Systray Notification Messages

    wow, thats really good!
    was it hard to make?

  25. #25

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    Depends on what you class as hard.

    There isn't much complex coding, but it's just about the design of the code and fitting components together. That's the hardest bit.

    I would say it's an avaergae to hard project.
    Now my multithreading code was hard

    Woka

  26. #26
    New Member
    Join Date
    Feb 2005
    Posts
    5

    Re: MSN Messenger Style Systray Notification Messages

    Nice code, thanks for sharing!

    One think I'd really like to see in code like this is for the notification not to steal focus from the app I'm currently working in when the notification displays.

    How difficult would that be to implement? I'm looking into it now & if I figure it out, I'll post.

  27. #27
    New Member
    Join Date
    Feb 2005
    Posts
    5

    Re: MSN Messenger Style Systray Notification Messages

    Edited....

    Woo Hoo! I figured it out...
    Here's the code:

    In the PopUpMessage class module's "general" section add the following code under the Option Explicit statement:

    Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
    Private Const SW_SHOWNOACTIVATE = 4


    Next, go down to the "Friend Sub MoveMessage" section and replace the .show statement with:

    ShowWindow hWnd, SW_SHOWNOACTIVATE

    Problem Solved!
    Last edited by 86atc250r; Feb 4th, 2005 at 05:15 PM.

  28. #28
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: MSN Messenger Style Systray Notification Messages

    Quote Originally Posted by Wokawidget
    Depends on what you class as hard.

    Now my multithreading code was hard

    Woka
    I swear woka you are going to marry that multithreading code one of these days....

    its too bad .net made it all to easy to multithread

  29. #29

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    Quote Originally Posted by 86atc250r
    Edited....

    Woo Hoo! I figured it out...
    Here's the code:

    In the PopUpMessage class module's "general" section add the following code under the Option Explicit statement:

    Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
    Private Const SW_SHOWNOACTIVATE = 4


    Next, go down to the "Friend Sub MoveMessage" section and replace the .show statement with:

    ShowWindow hWnd, SW_SHOWNOACTIVATE

    Problem Solved!
    Top notch Good idea. Will add that functionality to my code.

    Cheers again

    Klienma...you're just jealous

  30. #30
    New Member
    Join Date
    Feb 2005
    Posts
    5

    Re: MSN Messenger Style Systray Notification Messages

    Next thing - how difficult would it be, or what would be the best way to go about making the text in the message autowrap or make the message autosize to a point, then wrap?

    I'll look into that too if no one else figures it out before I do.

  31. #31

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    I agree. That's something I have planned.
    The functionality regarding the UI of the message is a bit lacking.
    It does what 99% of users would use it for, but I myself require a different UI style to the one of the moment.
    I am currently working on some enhancements for the UI.
    My time has been taken up recently my the development and improvement of my liveupdate code.

    My aim to to create a fully functional autoupdater with systray icon if it's running silently in the background, and popup messages to alert you to how the updates went, again in silent mode.
    If you take a peek at my liveupdate link in my sig you will see what I mean.

    I have all the components written and it's a matter of a few hours coding to link them all up and do some restructuring of the code in LiveUpdate.
    Oh, the liveupdate in my sig is an old version. I have been working on a new version for the last 2 weeks. Should be finished in a few days, if not tomorrow.

    Woka

  32. #32

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    Quote Originally Posted by 86atc250r
    Next thing - how difficult would it be, or what would be the best way to go about making the text in the message autowrap or make the message autosize to a point, then wrap?

    I'll look into that too if no one else figures it out before I do.
    Just re-read ya post. I am not sure what you are referring to
    Making the message box autosize is possible, but all the messages would be different sizes, and I think this would look sloppy. You can set the size of the message box using the properties of the Messages class.
    As for wrapping...errr...the label wraps the text...

    One thing it does require is to work out the height of the label, and trim the text so it fits in the message, adding "..." to the end of it. Does that make sense?

    Woka

  33. #33
    New Member
    Join Date
    Feb 2005
    Posts
    5

    Re: MSN Messenger Style Systray Notification Messages

    That all makes sense, but for some reason the text is not wrapping for me - for instance, I've got a media player application I'm using this code with. When I feed the message with artist and song title (when a song changes), neither will wrap if too long. The text will extend to the edges of the pop up & the rest will be cropped.

    Maybe I'm doing something wrong or overlooking something? Below is an example:
    Attached Images Attached Images  
    Last edited by 86atc250r; Feb 6th, 2005 at 12:29 PM.

  34. #34
    New Member
    Join Date
    Feb 2005
    Posts
    5

    Re: MSN Messenger Style Systray Notification Messages

    I think I've got this one whipped as well.

    Go into the code of the frmPopUpMessage form and find the Public Sub ResizeControls

    Under that sub find:
    VB Code:
    1. With lblMessage
    2.         .Left = (shpBorder.Width - .Width) / 2 + shpBorder.Left
    3.         .Top = (shpBorder.Height - IIf(prgBar.Tag = True, prgBar.Height + (2 * ICON_GAP), 0) - .Height) / 2 + shpBorder.Top
    4.        
    5.     End With

    And change it to:
    VB Code:
    1. With lblMessage
    2.         .wordwrap = true
    3.         .Width = shpBorder.Width - 100
    4.         .Left = (shpBorder.Width - .Width) / 2 + shpBorder.Left
    5.         .Top = (shpBorder.Height - IIf(prgBar.Tag = True, prgBar.Height + (2 * ICON_GAP), 0) - .Height) / 2 + shpBorder.Top
    6.        
    7.     End With
    Last edited by 86atc250r; Feb 6th, 2005 at 01:31 PM.

  35. #35

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    Just posted a new version. This allows the message to fade in and out.
    Only works on Win 2000 and above.

    Tried ya message label code, it didn't work for me.
    Will address this issue tomorrow.

    Zzzzzzz


    WOka

  36. #36
    Addicted Member
    Join Date
    Aug 2002
    Posts
    133

    Re: MSN Messenger Style Systray Notification Messages

    How would I use the popup after compiling a DLL for it from the vbg?

  37. #37

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    Exactly like you would in the DemoUI application...

    What you need to do is, 1st of all, close down the app.
    Then open up the vbAPITimer DLL, and compile that.
    Close the VB IDE
    Now open up the vbPopUpMessage vb app.
    Reference the vbAPITimers.dll, this can be done viw Project--->References then select vbAPITimer.
    Now compile the vbPopUpMessage app.
    Close the IDE down.
    Open up the DemoUI project.
    Project--->References--->vbPopUpMessages
    Now run the project.

    Hope that helps.

    Woka

  38. #38
    New Member
    Join Date
    Feb 2005
    Posts
    2

    Re: MSN Messenger Style Systray Notification Messages

    Awesome widget!

    Here's my two cents....

    1) Add a mobjPopus.WordWrap boolean property; the current version just runs a long string off the edges of the popup.

    2) When you change mobjPopups.MessageWidth, lblMessage in the pupup class apparently does not adjust to match the newly assigned width of the pop up. Obviously it would be good if it autosized with the rest of the popup.

    Nice work! I'd love to incorporate this gadget in an app I'm working on now. Any chance of a rework any time soon?!

    Bob

  39. #39

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: MSN Messenger Style Systray Notification Messages

    I'll have a look tonight...or you could do the changes your self
    Only requires some resize code for the label.

    Woka

  40. #40
    New Member
    Join Date
    Feb 2005
    Posts
    2

    Re: MSN Messenger Style Systray Notification Messages

    OK, I'll make you a deal. I made the changes to resize the label. How about if you fix the part that will keep adjust the top and left properties of the popup so that it will always be aligned with the corner of the screen if you change the message width or height properties (depending on which direction you are popping from.) For example, if you increase the width with PopUpDirection set to vbPopUp, then the right side of the popup is off screen. Simply setting the xpos and ypos isn't a good option because it would not compensate for variable screen resolutions.

    Deal?!

    Here's the change I added to frmPopUpMessage.ResizeControls to ensure that the label is properly resized. I also set the WordWrap proper to of the label to TRUE.

    Public Sub ResizeControls(ByVal plngMsgHeight As Long, ByVal plngMsgWidth As Long)
    ...
    With lblMessage
    .Top = shpBorder.Top + 100
    .Left = shpBorder.Left + 100
    .Width = shpBorder.Width - 200
    .Height = shpBorder.Height - 200
    End With
    ...
    End Sub

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width