Dear all,
How do you get yor app to appear on the task bar located on the bottom right hand corner of the windows screen.
I would alo like to control my app from here.
Can any any one HELP me!
Thanks in advance
Printable View
Dear all,
How do you get yor app to appear on the task bar located on the bottom right hand corner of the windows screen.
I would alo like to control my app from here.
Can any any one HELP me!
Thanks in advance
One solution is to use Microsofts SysTray.ocx.
But try it like this:
Private Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias _
"Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As _
NOTIFYICONDATA) As Long
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
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
'Make your own constant, e.g.:
Private Const NIF_DOALL = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
Private Const WM_MOUSEMOVE = &H200
Private Const WM_LBUTTONDBLCLK = &H203
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_RBUTTONDOWN = &H204
Public Sub CreateIcon()
Dim Tic As NOTIFYICONDATA
Dim erg As Long
Tic.cbSize = Len(Tic)
Tic.hwnd = Picture1.hwnd
Tic.uID = 1&
Tic.uFlags = NIF_DOALL
Tic.uCallbackMessage = WM_MOUSEMOVE
Tic.hIcon = TrayIcon.Picture
Tic.szTip = app.title
erg = Shell_NotifyIcon(NIM_ADD, Tic)
End Sub
Public Sub DeleteIcon()
Dim Tic As NOTIFYICONDATA
Dim erg As Long
Tic.cbSize = Len(Tic)
Tic.hwnd = Picture1.hwnd
Tic.uID = 1&
erg = Shell_NotifyIcon(NIM_DELETE, Tic)
End Sub
Private Sub Form_Load()
CreateIcon
End Sub
Thnaks a lot. I shall try this a little later. Shall post a reply soon.
Thanks a lot