CODE
'API used to display Icon in sys tray
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
'The Type used in the API.
Private 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
Dim nid as NOTIFYICONDATA
'Add icon to system tray
With nid
.cbSize = Len(nid)
.hWnd = Me.hWnd
.uId = vbNull
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = Me.Icon
.szTip = ToolTip & vbNullChar
End With
Call Shell_NotifyIcon(NIM_ADD, nid)
EDIT: Please, always use code tags when posting code, like so =>

, second, we have a strict policy about giving code out to those who have made no attempt to solve their problem, by posting the code they've used to try and resolve their issue, so please in the future follow that policy please
This post has been edited by PsychoCoder: 24 Jan, 2008 - 05:45 AM