Link to home
Start Free TrialLog in
Avatar of deal051298
deal051298

asked on

Pop up dialog in system tray

I want an app that behaves simlar to MSN Messenger. Basically just runs in the background in the system tray, opens up a form when clicked, on but most importantly pops up a message when notified of some event (like MSN does when user signs in or email arrives).

I think I can work the rest out but can someone post code to display a popup message? Simply tooltip format type would be cool.

Thanks.
Avatar of procyn00
procyn00

I think that the coolest way to do this, not necesarrily the best or most common way though would be to have transparent form popup and only display the GFX background and then have a caption to include your text within it. I can post code for that if your intereted.
would it always appear above the icon in the system tray? Also this is VB6. Old school :-)
Avatar of deal051298

ASKER

Oops. Wrong login. That was me.
ASKER CERTIFIED SOLUTION
Avatar of procyn00
procyn00

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You would then use the forms.visible property when you want the form to display and to hide and use a label with in that form... then use a timer to hide it i suppose.

So lets say they recieve mail...

Form1.Label.caption = "You got herpes!"
Form1.Show


Like i said earlier there are probably easier ways to do this but doing it this way enables you to do so much with it.

Oh also...

add this to the form's top

Private Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)

and this to the On_Load Sub

Dim rtn As Long
rtn = SetWindowPos(Form1.hwnd, -1, 0, 0, 0, 0, 3)

That will make it stay on top of the task bar :)

Another tip... you'd want the ShowInTaskBar property of the form to be false!
ok. let me try this. give me a couple of days and I'll get back

Thanks!
Does the trick beautifully thanks!

Might add some code to "slide" the form in/up to make it even better.

Cheers
Guys,

I was also looking for something that deal was looking for about popping up messages like MSN. I try to copy the above code in form1.frm,module1.bas and cDIBSection.csl and i constantly get an error saying user-defined type not allowed in the function Resample in the class. Any help??