# VBForums CodeBank > CodeBank - Visual Basic 6 and earlier >  MSN Messenger Style Systray Notification Messages

## Wokawidget

UPDATED 10th March 2005

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

Features:
Multiple popup messagesScrolling direction, Up, Down, Left or RigthSticky MessagesDisplay inside app or picbox by setting parent to containers hWndClick message to hide itMessage in front of all other windowsSmooth scrollingCustom background pictureCustom LogoCustom MessageCustom CaptionCustom SizePlay different sounds when showing messageAdd 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 outNEW: Detachable messages. Drag a message as a sticky desktop note.
Download the project and run Test.vpg.

Any comments most welcome.

Woka

----------


## 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...

----------


## jhermiz

> 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 ?

----------


## kleinma

here is a better cursor.. give it a try

----------


## kleinma

> Hmm seems like messenger, what purpose does this serve, reinventing the wheel ?


I don't follow you?

----------


## Wokawidget

> Hmm seems like messenger, what purpose does this serve, reinventing the wheel ?


Hahahaha...yes...exactly like messenger  :Roll Eyes (Sarcastic):  You gibbering yanky doodle dandy  :wave: 
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  :Big Grin: 

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

----------


## jhermiz

> 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.

----------


## 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

----------


## jhermiz

> 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  :Smilie: .
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 ?

----------


## kleinma

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...

----------


## jhermiz

I guess it depends on your needs.

----------


## kleinma

doesn't any piece of code?

----------


## jhermiz

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

----------


## 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...

----------


## jhermiz

> 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 ?

----------


## Wokawidget

You couldn't do:


```
objWoka objW = New objW("Place this text");
```

As my DLL was written in VB6, and this doesn't support:


```
New objW("Place this text")
```

You would have to use:


```
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

----------


## kleinma

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

----------


## Wokawidget

One step at a time Batman  :Big Grin: 

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  :Big Grin: 

Woka

----------


## Wokawidget

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

----------


## Wokawidget

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

----------


## NoteMe

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



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.


ØØ

----------


## Steve Stunning

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

----------


## Wokawidget

Thank you  :Big Grin: 

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

----------


## |2eM!x

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

----------


## Wokawidget

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  :Big Grin: 

Woka

----------


## 86atc250r

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.

----------


## 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!

----------


## kleinma

> 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....   :big yellow:   :big yellow:  

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

----------


## Wokawidget

> 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
> ...


Top notch  :Big Grin:  Good idea. Will add that functionality to my code.

Cheers again   :wave:  

Klienma...you're just jealous  :Wink:

----------


## 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.

----------


## Wokawidget

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

----------


## Wokawidget

> 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  :Frown: 
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... :Confused: 

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

----------


## 86atc250r

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:

----------


## 86atc250r

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:
With lblMessage
        .Left = (shpBorder.Width - .Width) / 2 + shpBorder.Left
        .Top = (shpBorder.Height - IIf(prgBar.Tag = True, prgBar.Height + (2 * ICON_GAP), 0) - .Height) / 2 + shpBorder.Top
        
    End With

And change it to:

VB Code:
With lblMessage
        .wordwrap = true
        .Width = shpBorder.Width - 100
        .Left = (shpBorder.Width - .Width) / 2 + shpBorder.Left
        .Top = (shpBorder.Height - IIf(prgBar.Tag = True, prgBar.Height + (2 * ICON_GAP), 0) - .Height) / 2 + shpBorder.Top
        
    End With

----------


## Wokawidget

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

----------


## rjdpa

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

----------


## Wokawidget

Exactly like you would in the DemoUI application... :Confused: 

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

----------


## bcrimmins

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

----------


## Wokawidget

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

Woka

----------


## bcrimmins

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?!  :Thumb:  

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

----------


## Wokawidget

I thought word wrap was On. D'oh. Cheers  :Big Grin: 

Changing the message width would make it look funny if you've alligned it to the far corner.
I have thought about this ages ago and decided not to add this in for the following reasons:
An app should only use 1 sized message for consistancyI believe this code should live in the UI and not the Message dll
Does that make sesne?

Hmmm however...on second thoughts...I could add an allign property in.
Howvere I don't have time to do this at the mo as I am working on about 5 different projects at the same time and it's messing with my head. I have decided to give it a rest for a week and reclaim back my social life  :Big Grin: 

Keep coming up with the good suggestions  :Big Grin: 

I am about to add this into my MSN Messenger app (see link in sig) so that I can have popups like messenger for my own messenger (BTW it uses the MSN network  :Wink: )

Woka

----------


## RobCrombie

Hi,
Could it be made into a User Control ?    ( .ctl )
No VBG,  no OCX,   no DLL

----------


## Wokawidget

errrr.yea.
Well I wouldn't make it into an OCX because it could be used by a DLL, and you cant use an OCX in a DLL except if you use a form (bad)

What you can do is add ALL the module, classes and forms into your normal project and it will still work.
To be fair, it's best being a DLL since more than one app can then use this.

Woka

----------


## dlmorgan999

This is a very nice tool but I'm having one problem.  I don't know if there is a fix for this but I figured I'll ask.  I got it all integrated into my application and it works perfectly - when running from the IDE.

However when I run the compiled app I run into an issue.  In my compiled app I want to use this to notify users when they have received an email on our internal application email system.  It works great except that there is a very high likelihood that they will be using a modal form when they get this notification.

The app works just as I want when running from the IDE but I get "Run-time error '402'" when running the compiled version.  Is there anything I can do to make this work?

-- Dave

----------


## r_karthy

Dear Sir,
Thanks for providing a good tool.
i require this tool to be integrated in an application
Whenever the employee leave application has been sanctioned by his boss, He needs to informed like this. For this How to go about.
Please explain
Thanking you
yours
Karthikeyan R

----------


## Wokawidget

Here's a very very simple demo...

Woka

----------


## Pedster

Is there a way of resizing the actual popup, aligning all the controls, as manually resizing it in VB makes no difference...

Excellent dll by the way....... shame we need the apitimer.dll included in our package too

----------


## Wokawidget

if you don't want vbAPITimer.dll in your package then just take the module, and class from vbAPITimer and add them to the project you want them to be in.
The reason this is a DLL is because loads of my projects use this timing component, and it just made sense to sperate it out into it's own DLL. I am fussy like that  :Big Grin: 

You can make the popup fixed. But I wanted the developer to pick the size of the message box. Bearing in mind that a few of my apps use this, and they don't want the same message sizes as some info I display is much bigger.

You can change the height and widht of the popup by using the MessageWidht and Height properties of PopupMessages Class. Is this what you wanted?

Woof

----------


## Pedster

> if you don't want vbAPITimer.dll in your package then just take the module, and class from vbAPITimer and add them to the project you want them to be in.


Ok, I'll do that... Thanks.  :Thumb:  



> You can change the height and widht of the popup by using the MessageWidht and Height properties of PopupMessages Class. Is this what you wanted?


Yes, sorry, I should take more notice of the code more.......  :Roll Eyes (Sarcastic):

----------


## RobertMa

I'm a newbie so please don't flame if this is a really dumb question...

I compiled the projects into dll's and am calling them within my vb .net program successfully using the code below:
VB Code:
Dim objMsg As New vbPopUpMessages.PopUpMessage
        Dim objMsgs As New vbPopUpMessages.PopUpMessages
        objMsg.Caption = "test"
        objMsg.Message = "message"
        objMsgs.Show(objMsg)

I would like to add a custom background and thought this line would do it:
VB Code:
objMsg.Background = PictureBox1

But  I am getting this error:

An unhandled exception of type 'System.InvalidCastException' occurred in program.exe

Additional information: Specified cast is not valid.


Could someone help?


  Added *[vbcode]**[/vbcode]* tags - Hack

----------


## Wokawidget

Hmmm...it works in .NET, cool.

I am assuming it doesn't work because a .NET picturebox is not the same as a VB6 picture box  :Frown: 

Not sure how you would do this. I'll ask some people at work.

WOka

----------


## RobertMa

Got it to work.
VB Code:
Dim objPic As New vbPopUpMessages.PopUpMessage
            objPic.Caption = "Test"
            Dim imgconv As ImageConverter
            objPic.Background = imgconv.ImageToIPicDisp(picImage.Image)
            objMsgs.Show(objPic)
 Public Class ImageConverter
    Inherits System.Windows.Forms.AxHost
     Public Sub New(ByVal pGUID As String)
        MyBase.New(pGUID)
    End Sub
     Public Shared Function ImageToIPicDisp(ByVal value As System.Drawing.Image) As stdole.IPictureDisp
        Return System.Windows.Forms.AxHost.GetIPictureDispFromPicture(value)
    End Function
     Public Shared Function IPicDispToImage(ByVal value As stdole.IPictureDisp) As System.Drawing.Image
        Return System.Windows.Forms.AxHost.GetPictureFromIPictureDisp(CType(value, Object))
    End Function
End Class



  Added *[vbcode]**[/vbcode]* tags - Hack

----------


## Hack

> I'm a newbie so please don't flame if this is a really dumb question...


No one should ever be flaming anyone, so that is something you don't have to worry about (if it does happen, PM a Mod and let us handle it.   :Smilie:  )

Incidentially, as you can see, I've added *[vbcode]**[/vbcode]* tags for your two posts and request that you use them in future posts.   As you can see, it makes posted code so very much easier to read.    :Thumb:

----------


## RobertMa

Thanks Hack.




> here is a better cursor.. give it a try


How would I switch to this smaller cursor to see how it looks?  I can't find a reference to the Hand.cur anywhere.

----------


## dedbob

I've found that everything works very well, but I have run into a minor bug.

I've noticed that if you open a modal window while a notification window is open, the notification window timer is halted and the notification windows won't go away until the modal window is closed.. This should be fine, however, in my application I have a modal (preferences) window that can open another modal window.  I've found that when the second modal window is closed, the notification windows must receive some kind of message that tells them a modal window closed, and they restart their timer and eventually try to close.  However, my first modal window (preferences) is still open, and when a notification window closes while a modal window is open, you get the following error message:


---------------------------
vbPopUpMessages
---------------------------
Run-time error '402':

Must close or hide topmost modal form first
---------------------------
OK   
---------------------------


I can also get the same error message to appear if I open a modal window while a notification is in the process of closing (while it's sliding back down).


It seems that the windows will not begin the closing operation (sliding back down) if a modal window is open, but it appears that it's the actual unloading of the window that cannot happen while a modal window is open.. Any suggestions on how to either prevent the notification window from unloading itself while a modal window is displayed, delay the unloading of the notification window until after the modal window is unloaded, or possibly unload the notification windows without the error message being displayed?

Thanks in advance!

----------


## Wokawidget

Is this when running in the IDE or from compiled code?

WOka

----------


## dedbob

Running compiled code causes the crash.

No crashes when running in IDE.. I'm guessing because there's probably some difference in how the IDE emulates the modal window..

----------


## dedbob

Any new info or suggestions of the modal window error message?

For now I've worked around the issue by closing all current popups immediately prior to the modal window being shown, and disabling the creation of new popups while the modal window is visible..  But a cleaner solution would definitely be appreciated..

Thanks again!

----------


## Wokawidget

nope noone what so ever. This code was written years ago in vb6. Alas, I have progressed and don't code in vb6 anymore. I very much doubt I will ever do anymore modifications to any of my vb6 projects. I do however, intend to write some .net versions...hopefully.

woof

----------


## shakti5385

Nice code

----------


## Flattery

I have a program that uses this but if compiled on Windows XP with no service packs installed, the popups don't work on a system with Service Packs installed (such as SP2) and vice versa.

The rest of my program still works, but what part of the popup program is it that doesn't work when running on a different system?

----------


## 明日的天空

我晕,说不到E文的了??  :Ehh:  

MSN源码么?
下个下来先看看了,呵

欢迎访问我的网站
http://vb.gzcg.com 
Welcome  :Eek Boom:  

I'm from China, Don't Spack English!!
 :big yellow:   :big yellow:   :Alien Frog:   :Alien Frog:  
MSN source code?

----------


## 明日的天空

Speak Chinese,OK

----------


## kleinma

You probably won't find much help here. Your typing doesn't even show up due to chinese font.

----------


## Wokawidget

> I have a program that uses this but if compiled on Windows XP with no service packs installed, the popups don't work on a system with Service Packs installed (such as SP2) and vice versa.
> 
> The rest of my program still works, but what part of the popup program is it that doesn't work when running on a different system?


Hmmm...I am not sure why this would happen. Makes no sense  :Frown: 
If you compile on a SP2 XP machine does it then work on another sp2 xp machine?

Wopka

----------


## Wokawidget

> Speak Chinese,OK


I am afraid that this is an English speaking web site  :Frown: 
Most of the users here, I would say about 99.999% of them, are from the UK, Europe and the US. Chinese alas, is not a spoken language of these countries I am afraid. (yea yea I know Europe isn't a country).

Woka

----------


## knightcon

Hey guy's,

I think this is a great dll for any background/sysbar app. Just wondering if there is any way that something like this could be done in Javascript?

----------


## Wokawidget

Thanks  :Smilie: 

Javascript?

For a web page?

check out:

WebMessenger.msn.com

So, in answer to your question, yes, it can be done  :Big Grin: 
But it's not entirely done in JS.

Is that what you meant?

WOka

----------


## penagate

Check out meebo.com as well.

The client front end can be made in Javascript, but the actual communication must be done server-side, due to cross-domain scripting limitations imposed by browsers.

----------


## Wokawidget

cool. Nice UI.

Long time no see *waves*

Woof

----------


## knightcon

thanks but I wasn't after internet messaging, i just wanted to know if the alert window show at the beginning of this topic could be used with a web browser,

browsers would be...
IE, Firefox, Safari, etc

----------


## penagate

Oops, thought we were in a different thread.

Woka's link shows popup messages like these using Javascript. But, it relies on popup windows. Most browsers will block these by default.

If you want to show it on the page, that's easy: just use an absolutely positioned div element.

----------


## Wokawidget

> Woka's link shows popup messages like these using Javascript. But, it relies on popup windows. Most browsers will block these by default.


Yup. That's why I posted it  :Big Grin: 

I am sure you can use JS to popup windows inside IE, but not near the systray. Those you see from webmessenger are, as Pengate stated, popup windows.


Woof

----------


## bazzacad

This is some great code. I've been looking fro a free version of this for a while now. Can someone tell me how to get it to work in VB.NET 2005 Express?
I still have VB6, if I need to compile it there first.

Thx.

----------


## Wokawidget

You should be able to compile it as normal in VB6. Make sure all dlls are registered on the VS 2005 machine. Then just reference the popup dll as a com reference...i think.

Woka

----------


## feneck

Wow, this code is really something. Good work Woka.

----------


## knightcon

I really like this control. I have been writing several applications for family and friends that check to see when an email comes through on any of their POP3 emails and this control has allowed me to get rid of the annoying message box and replace it with a non-obtrusive message box in the bottom corner just like in MSN messenger.

----------


## Wokawidget

Glad you like it  :Big Grin: 
Much much better than a msg box  :Smilie: 

I really should write a .NET version.

----------


## obrienkev

Hi,

How do I use this brilliant application for my Windows C# Application??

Thanks.

----------


## Justin M

lol this is nice, but if I use this in my program will I be sued?

----------


## Wokawidget

obrienkev, can you not reference the dll as a com reference?

Justin. Thanks. No you will not be sued for using it  :Big Grin: 
I posted the code for things like this so people can use them in their apps, and modify the source code.

If you want to send me the link to your apps site then that would be cool, and if you mention me in the credits of the app that would also be cool...but not essential  :Smilie: 

Glad you like the code. use away  :Big Grin: 

Woof

----------


## Revivalry

Good project there mate well done

----------


## viddas

Sorry to post in this old thread but any idea if and when the .Net version will be ready?

----------


## Wokawidget

I started it 3 years ago, and never finished it. Don't even know where the source code is now  :Frown: 

Woka

----------


## DigiRev

Don't know what that guy was talking about, why this thing would be useful.  :Confused:  Use your imagination.

I made my friend a personal program and this will be cool to notify him when someone connects to his server.

----------


## AndreISRS

Wokawidget, this might be from the previous century I know, but I have been stuck with this for a week now!! :Frown: 

I love the code you supplied here, tried to use it and so on...

All works fine, but I have been trying to implement this in an app where the popup goes to another user on the network. The whole idea is for a department to first get authorisation from the Fin. manager to expenses or obtain an order. When applying, the fm will receive the popup, send an authorisation to the debtors clerk who will then raise the order. 

As I said, I can not get this to send on LAN. I had a previous chat type program, but yours is far more superior. Any ideas? :Confused:

----------


## Wokawidget

Hi,

This functionality I am afraid is not out of the box.
The code that displays the popup *must* be on the target machine...this is just the VB6 way.

There are a few ways you could implement this:

Client Server TCP/IP
1) Create a server app that listens on a port
2) Store details of logged in fm clients
3) Write a client app that is installed on the FM's client machine that connects to the server app
4) When a request is sent to the FM client it shows the popup

FileSystem Watch
1) Write a server app to submit requests to clients
2) Each client has a shared network folder
3) When a request is submitted a file is generated in the FM's network folder
4) Create a client app that is installed on the FM client machine
5) The client looks at the network folder and raises an event when a new file is added
6) Based on the file display a popup

Database
1) Create a main admin app that connects to a DB
2) Each FM has a user account in the db
3) To submit a request to an FM simply add a new request record into the Db
4) Create a small client app for the FM client pc.
5) The FM client app checks the db every x many mins and dispays new requests as popups

All 3 methods arn't that simple and will require a reasonable amount of coding.

Personally I like the db method...this also allows you to track history etc and extra custom functionality you may wish to addin.

All make sense?

Woka

----------


## AndreISRS

I tend to agree with your choice. I think I will settle for the DB option as well. The work involved that will raise the least errors should be the DB option I'm sure. I have written many db server based apps before, and know that if an error is trapped beforehand, you end up with an enjoyable, hassle free app to your clients. Thanks for your info. 


What I am concerned for is getting a popup to show. Here is some ideas??

depending on the kind of request, order, cheque req. etc, I can create a custom message for the popup.
invoke the cmd_click event to show the popup.
keep popup until read/answered.
close popup application.....

something along these lines.

Cheers bud, thanks again.

----------


## Wokawidget

put a timer on a form. every x seconds the timer queries db. if a request is there then call the popup code.
just put the code from the command click in a seperate procedure.

Woika

----------


## AndreISRS

Thanks again Woka,

Would you mind if I alter your code and incorporate it with the LAN application? I will post the final result to use on a network here for all to use. :Big Grin:

----------


## Wokawidget

go for it. I don't mind.
Although the code itself wouldn't need to change.
You just need to write a few extra apps that reference the popup dll.

Woka

----------


## Eliminator2009

how do pass recordset information with this control? :Eek Boom:

----------


## AndreISRS

Eliminator, I have created a table in my database where one of the fields is called "AnsweredYesNo". As soon as the popup is shown and the client on a different pc/ip clicks on the label it updates the field to yes. Within a timer on the client machines form, I check the table/field above for a "No" answer. Once it shows no AND the client is on the given IP, the popup will show on their screen, else it will show on the person who's IP has been flagged.

----------


## Eliminator2009

> Eliminator, I have created a table in my database where one of the fields is called "AnsweredYesNo". As soon as the popup is shown and the client on a different pc/ip clicks on the label it updates the field to yes. Within a timer on the client machines form, I check the table/field above for a "No" answer. Once it shows no AND the client is on the given IP, the popup will show on their screen, else it will show on the person who's IP has been flagged.


Dear AndreISRS,

I am a beginner programmer in vb. Do you show it by a code example.

Thanks. :Eek Boom:

----------


## clarkgriswald

Hey Woka, been looking through the code (very nice stuff btw), but am having trouble following what's going on in the MoveMessages routine, possible to breakdown that a bit for me? Essentially there is an issue where popups are not disposing properly and I am having trouble debugging because I don't necessarily follow some of the logic in that routine. Any chance you can break it down for me? 

To repro the issue I am seeing, show two sticky popups, click the message to delete the most recent, then try to click the message to dismiss the first one - nothing happens. Any help would be greatly appreciated.

Thanks!

----------


## Arnoutdv

The thread is more than 12 years old and Wokawidget hasn't been on the forum since 2015.
So I don't think you will get an answer soon  :Smilie:

----------


## clarkgriswald

> The thread is more than 12 years old and Wokawidget hasn't been on the forum since 2015.
> So I don't think you will get an answer soon


Thanks for heads up; I rewrote the section and fixed issue.

----------


## jpbro

Maybe you could post your solution? Might help someone else sometime in the next 12 years  :Wink:

----------

