Infobulle sur image

maval

XLDnaute Barbatruc
Bonjour,

Je suis à la recherche d’un code que lorsque je passe sur une image il affiche une infobulle qui qui me donne les renseignements si dessous.

"Titre, Titre Original, Date de Sortie, Acteurs, Genre, Durée, Critique Presse, Critique Spectateur, Réalisateur."

Je vous remercie d’avance
 

Pièces jointes

  • Ijnfobulle.xlsm
    30.3 KB · Affichages: 102

david84

XLDnaute Barbatruc
Re : Infobulle sur image

Autre possibilité sans cacher la barre des tâches :
Dans Private Sub UserForm_Initialize :
Code:
Me.Width = ScreenWidth * PointsPerPixel
Me.Height = ScreenHeight * PointsPerPixel

Dans le module 1 :
Code:
Public Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long 
Public Declare Function GetDC Lib "user32" _
    (ByVal hwnd As Long) As Long


Public Declare Function GetDeviceCaps Lib "gdi32" _
    (ByVal hDC As Long, ByVal nIndex As Long) As Long


Public Declare Function ReleaseDC Lib "user32" _
    (ByVal hwnd As Long, ByVal hDC As Long) As Long
    
Public Const SM_CXSCREEN = 0   'Screen width
Public Const SM_CYSCREEN = 1   'Screen height
Public Const LOGPIXELSX = 88  'Pixels/inch in X

'Adapté d'une idée de Pearson
'A point is defined as 1/72 inches
Private Const POINTS_PER_INCH As Long = 72

'The width of the screen, in pixels
Public Function ScreenWidth() As Long
 ScreenWidth = GetSystemMetrics(SM_CXSCREEN)
End Function


'The height of the screen, in pixels
Public Function ScreenHeight() As Long
 ScreenHeight = GetSystemMetrics(SM_CYSCREEN)
End Function


'The size of a pixel, in points
Public Function PointsPerPixel() As Double


 Dim hDC As Long
 Dim lDotsPerInch As Long


 hDC = GetDC(0)
 lDotsPerInch = GetDeviceCaps(hDC, LOGPIXELSX)
 PointsPerPixel = POINTS_PER_INCH / lDotsPerInch
 ReleaseDC 0, hDC
End Function
NB : dans le cas la barre des tâches est placée en haut le formulaire la recouvre bien mais elle apparaît en transparence. Si cela est gênant alors la masquer comme proposé dans le message précédent.
A+
 

Discussions similaires

Réponses
4
Affichages
353

Statistiques des forums

Discussions
312 563
Messages
2 089 681
Membres
104 252
dernier inscrit
dbsromaric