Afficher des infos bulles

Pop85 Messages postés 17 Statut Membre -  
 Pop85 -

Bonjour à tous,

Sous Visual Basic Express j'écris un programme sur la numérologie, le Feng-Shui et différentes astrologies. Est-il possible d'afficher des info-bulles pour expliquer différents résultats. Par exemple lorsque mon curseur se stop sur une "TextBox" affichant un résultat, un message s'affiche explique brièvement à quoi le résultat correspond. Idem sur un Button, etc...

D'avance merci et bonne semaine à tous.

Pop85

1 réponse

  1. cs_Le Pivert Messages postés 8437 Statut Contributeur 730
     

    Bonjour,

    Intéresses-toi à la propriété ToolTip de ton control

    Voir ceci


    2
    1. Pop85 Messages postés 17 Statut Membre
       

      Bonjour, je me suis intéressé aux propriétés de ce contrôle, voici que j'ai écrit mais l'info bulle ne s'affiche pas.

      Private Sub ToolTip1_Popup(sender As Object, e As PopupEventArgs) Handles ToolTip1.Popup
              ToolTip1.ShowAlways = True
              ToolTip1.SetToolTip(BTN1Elan, "Elan Spirituel")
          End Sub 

      Peux tu m'aider, Merci

      Pop85

      0
      1. cs_Le Pivert Messages postés 8437 Statut Contributeur 730 > Pop85 Messages postés 17 Statut Membre
         

        Dans le lien donné, il y a un exemple. Il suffit de l'adapter!

        ' This example assumes that the Form_Load event handling method
        ' is connected to the Load event of the form.
        Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
           ' Create the ToolTip and associate with the Form container.
           Dim toolTip1 As New ToolTip()
           
           ' Set up the delays for the ToolTip.
           toolTip1.AutoPopDelay = 5000
           toolTip1.InitialDelay = 1000
           toolTip1.ReshowDelay = 500
           ' Force the ToolTip text to be displayed whether or not the form is active.
           toolTip1.ShowAlways = True
           
           ' Set up the ToolTip text for the Button and Checkbox.
           toolTip1.SetToolTip(Me.button1, "My button1")
           toolTip1.SetToolTip(Me.checkBox1, "My checkBox1")
        End Sub

        Voilà

        @+

        1
      2. Pop85 > cs_Le Pivert Messages postés 8437 Statut Contributeur
         

        Super sympa, ça fonctionne.

        Merci beaucoup.

        0