slyman00
Messages postés1Date d'inscriptionvendredi 3 novembre 2000StatutMembreDernière intervention23 juin 2009
-
23 juin 2009 à 17:10
CTAC
Messages postés133Date d'inscriptionmardi 24 décembre 2002StatutMembreDernière intervention 8 juin 2012
-
28 juin 2009 à 18:51
Bonjour à tous!
Je tente d'ajouter un icone dans le "system tray" en VBA sous msaccess 2007 et j'y arrive pas...
Je suis sous vista
Voici le code que j'ai palcé dans un module:
Option Compare Database
Option Explicit
Public Declare Function GetLastError Lib "kernel32" () As Integer
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
Public Sub CreateIcon()
With NID
.cbSize = Len(NID)
.hWnd = Forms(0).hWnd
.uCallbackMessage = WM_MOUSEMOVE
.uID = 1
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.szTip = "SYS TRAY" & vbNullChar
.hIcon = LoadPicture("Z:\Bibliothèque\Icone\boss.ico")
End With
Debug.Print Shell_NotifyIcon(NIM_ADD, NID)
End Sub
Voila... la fonction Shell_NotifyIcon me retourne toujours 0 et je sais pas quoi faire de plus