Jul 25, 2008

Tray Info Message - Kind of popup thingie

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > VB Programming

free web hosting

Tray Info Message - Kind of popup thingie

friiks
Hi!

I'm doing VB for some time now and for last two days I've been looking for a tutorial which would show me how to create some kind of notification that would pop up from lower-right side of my screen, where the clock is... you know, just like.. when a contact comes online on MSN etc.

I realized that there's no way to make a balloon pop up like the one in the image but is there a way to make anything like that..it doesn't have to be a balloon. A little square in the right spot would be good as well tongue.gif



Thanks in advance, Matt.

Reply

imbibe
Are you doing this with VB.NET or VB6. This thing is possible with both. in VB6 you need to call the Windows API & in .NET this functionality is in-built.

Reply

friiks
I'm using VB6...
I couldn't find a way on how to do it with API o_O

Reply

imbibe
I am attaching a control that you can study to place an icon in the tray area that show tooltips.
So you can provide notification. The screenshot you posted has ballon tips. I will see if I can do it & will do a Tutorial if possible.
If you can't understand the code then I'll try to do the Tutorial tomorrow.

[attachment=1029:TrayArea.txt]

Reply

friiks
Thanks! biggrin.gif
I'll try to understand it...
Looks kinda hard though :S

Reply

friiks
Oooh, could you please make a tutorial or explain by showing an example maybe ?



Reply

imbibe
Sorry, I don't have the time to make the tutorial. I used that code in one of my projects. I am attaching that project to help you out.

Actually I wrapped that code in a control. You only need to set a few properties like the ICON to be displayed in the notification area, the TOOLTIP etc. You can then handle the LEFT-MOUSE-CLICK or RIGHT-MOUSE-CLICK events on the ICON (in the notification area).

[attachment=1031:Wall_xp.zip]

Reply

calvin-w
CODE
[/code]Dim nid As NOTIFYICONDATA ' trayicon variable

'----------------------
'--- command1 click ---
'----------------------
Private Sub Command1_Click()
minimize_to_tray
End Sub

'------------------------
'--- create tray icon ---
'------------------------
Sub minimize_to_tray()
Me.Hide
nid.cbSize = Len(nid)
nid.hwnd = Me.hwnd
nid.uId = vbNull
nid.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
nid.uCallBackMessage = WM_MOUSEMOVE
nid.hIcon = Me.Icon ' the icon will be your Form1 project icon
nid.szTip = "Calvin-w" & vbNullChar
Shell_NotifyIcon NIM_ADD, nid
End Sub








'---------------------------------------------------
'-- Tray icon actions when mouse click on it, etc --
'---------------------------------------------------
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim msg As Long
Dim sFilter As String
msg = x / Screen.TwipsPerPixelX
Select Case msg
Case WM_LBUTTONDOWN
Me.Show ' show form
Shell_NotifyIcon NIM_DELETE, nid ' del tray icon
Case WM_LBUTTONUP
Case WM_LBUTTONDBLCLK
Case WM_RBUTTONDOWN
Case WM_RBUTTONUP
Me.Show
Shell_NotifyIcon NIM_DELETE, nid
Case WM_RBUTTONDBLCLK
End Select
End Sub

'------------------------------
'--- form Actions On unload ---
'------------------------------
Private Sub Form_Unload(Cancel As Integer)
Shell_NotifyIcon NIM_DELETE, nid ' del tray icon
End Sub[code]

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. popup tray message - 3.46 hr back. (1)
  2. tray message vb6 - 14.55 hr back. (1)
  3. notifyicondata vb6 gif - 19.43 hr back. (1)
  4. try icon notification message in vb.net - 23.87 hr back. (1)
  5. balloon help how to vb6 - 39.43 hr back. (1)
  6. show info of system tray in .net - 43.71 hr back. (1)
  7. show message in system tray in .net - 43.91 hr back. (1)
  8. popup message from tray in web - 44.45 hr back. (2)
  9. .net balloon tray notification - 58.18 hr back. (1)
  10. vb.net popup message - 59.77 hr back. (1)
  11. pop up message windows right side - 61.70 hr back. (1)
  12. popup notify vb.net - 76.08 hr back. (1)
  13. system tray message vb.net - 86.10 hr back. (1)
  14. vb.net popup form minimized - 88.84 hr back. (1)
Similar Topics

Keywords : tray, info, message, kind, popup, thingie

  1. Simple Message Box
    (3)
  2. Popup Blocker
    (2)
    You can create a popup blocker from VBA!!! Click URLs below: LINK:
    http://www.freevbcode.com/ShowCode.Asp?ID=3921 Download code(ZIP):
    http://www.freevbcode.com/source/NoPopUp.zip ....
  3. [tutorial] Visual Basic 6 Minimize To Tray
    Minimize to Tray (4)
    This example will "minimize" your program to the system tray when you click on a button, and restore
    it when you click the system tray icon. For this example you'll need: 1 Form - Form1 1 button -
    Command1 Add a Module to your project, and ad this code: CODE ' Create an Icon in System
    Tray Needs Public Type NOTIFYICONDATA cbSize As Long hwnd As Long uId As Long uFlags As Long
    uCallBackMessage As Long hIcon As Long szTip As String * 64 End Type Public Const NIM_ADD = &H0
    Public Const NIM_MODIFY = &H1 Public Const NIM_DELETE = &H2 Public Const WM_MOUSEMOVE ....

    1. Looking for tray, info, message, kind, popup, thingie

Searching Video's for tray, info, message, kind, popup, thingie
advertisement



Tray Info Message - Kind of popup thingie



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE