Minimize to system tray

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does any one know of a way to mimize an access database to an icon in the
system tray?

TIA

Rico
 
I don't know if that is possible, but you could get a very similar effect by
placing the shortcut into the Quick Launch toolbar.
 
Its just that i want to run a little looping front end, that just sits in the
background. Would be good if it wasn't fully open all day getting in my way!

Cheers tho
 
Take a look at http://www.mvps.org/access/api/api0045.htm

Assuming you're using Access 2000 or newer, you can ignore the comment that
"you will need the AddressOf code as well", as AddressOf is built into newer
versions, but you'll need to change the line of code

lpPrevWndProc = apiSetWindowLong(frm.hWnd, _
GWL_WNDPROC, _
AddrOf(strFunction))

to

lpPrevWndProc = apiSetWindowLong(frm.hWnd, _
GWL_WNDPROC, _
AddressOf strFunction)
 
Thanks alot doug, but getting a compile error on the bit you say to change.
It says "Expected sub, function or property" and highlights "AddressOf
strFunction".

Any ideas?

TIA

Rico
 
What version of Access are you using?

What's the exact change you made to that line of code?
 
Running access 2003.

Code for that sections looks as follows:

Sub sHookTrayIcon(frm As Form, _
strFunction As String, _
Optional strTipText As String, _
Optional strIconPath As String)
'Initialize the tray icon first
If fInitTrayIcon(frm, strTipText, strIconPath) Then
'hide the form window
frm.Visible = False

'Set new address for window's message handler
lpPrevWndProc = apiSetWindowLong(frm.hWnd, _
GWL_WNDPROC, _
AddressOf strFunction)
End If
End Sub

TIA

Rico
 
Sorry, I don't have Access 2003 installed here.

I'll try and take a look when I get home tonight.
 
Thanks Doug, much appreciated

Douglas J Steele said:
Sorry, I don't have Access 2003 installed here.

I'll try and take a look when I get home tonight.
 
Sorry, I can't get it to work, and I'm afraid I don't have time to
investigate whether it's something in the code, or changes in Access 2003.
 

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

Back
Top