How to add a MDB shortcut Icon in Notification area

G

Guest

I have a created a shortcut on my desktop to open my mdb.
I want to make another shortcut and put it on the windows notification area
(systemTray).
Is it possible to do this. As it will be great if you advise me a method,
where third party software is not required.

As I tried by third party software, which is trial and secondly paid.

Please advise.

Regards.

Irshad.
 
R

Rick B

I know you can put it in the "quick launch" bar over on the left side near
the "Start" button by just dragging it there. If you are using XP (and
maybe some other versions), you can right-click on the taskbar and select
"Tool bars" then check the "Quick Launch" item. You can then drag shortcuts
to that area.

This is really more of a Windows question, than an Access question. You
might try posting to a newsgroup for the version of Windows you are using
and you might get some other ideas.
 
D

Danny J. Lesandrini

I've done it with Visual Basic. See the code below. Never tried it with Access,
so there are no guarantees, but it's a starting point.
--
Danny J. Lesandrini
(e-mail address removed)
http://amazecreations.com/datafast


Irshad Alam said:
I have a created a shortcut on my desktop to open my mdb.
I want to make another shortcut and put it on the windows notification area
(systemTray).
Is it possible to do this. As it will be great if you advise me a method,
where third party software is not required.

As I tried by third party software, which is trial and secondly paid.

Please advise.

Regards.

Irshad.



' /////////////////////////////////////////////////////////////////////////////////////
' Note: Code borrowed from site ...
' http://www.vbsquare.com/php-bin/printfriendly.php?tipid=178
'
' /////////////////////////////////////////////////////////////////////////////////////

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 WM_MOUSEMOVE = &H200
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4

Private Declare Function Shell_NotifyIcon Lib "shell32" _
Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid _
As NOTIFYICONDATA) As Boolean

Dim t As NOTIFYICONDATA

Private Sub UpdateTaskBar()
On Error Resume Next

t.cbSize = Len(t)
t.hWnd = Picture1.hWnd
t.uId = 1&
t.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
t.ucallbackMessage = WM_MOUSEMOVE
t.hIcon = Picture1.Picture
t.szTip = strOnOffCaption & Chr$(0)

Shell_NotifyIcon NIM_ADD, t

Timer1.Enabled = True

'Me.Hide

App.TaskVisible = False
DoEvents
End Sub


Public Sub UnloadSysTray()
On Error Resume Next

Timer1.Enabled = False

t.cbSize = Len(t)
t.hWnd = Picture1.hWnd
t.uId = 1&

Shell_NotifyIcon NIM_DELETE, t

'DoEvents
'Picture1_MouseMove 0, 0, 0, 0
End Sub
 
G

Guest

Thanks for your advise.

But I dont know how to use your code.
Your mean that I will paste in a module. Save it.
Make a shortcut on Desktop
And then edit your VB code and Run through Macro.

Please advise me in little details as I am not good in VB.

Your advise may help me to achieve me what I am looking forward to.

Regards.

Irshad
 
D

Danny J. Lesandrini

I don't mean to be unkind, but if you are not good with VBA, then the
task you seek may be beyond your means. It wasn't trivial to implement
in Visual Basic. I don't even know if it will work from Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top