Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Windows Forms
  4. Button control

Button control

Scheduled Pinned Locked Moved Windows Forms
questionc++
6 Posts 3 Posters 15 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dodoxor
    wrote on last edited by
    #1

    Hello to everyone. I've a window form application in c++ and i've a button in it. How can i add the properties that when the mouse is over the control a description of the control is shown? Thanks for answers regards.

    M V 2 Replies Last reply
    0
    • D dodoxor

      Hello to everyone. I've a window form application in c++ and i've a button in it. How can i add the properties that when the mouse is over the control a description of the control is shown? Thanks for answers regards.

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      Catch the MouseOver event :rose:

      D 1 Reply Last reply
      0
      • M Manas Bhardwaj

        Catch the MouseOver event :rose:

        D Offline
        D Offline
        dodoxor
        wrote on last edited by
        #3

        Hi, thanks for answer. I'know there's the event onmousehover but i think what i want is different. when you are on a button,(like start button of windows xp) a yellow rectangle with a help description is shown. How can i do this? Thanks , regards

        M 1 Reply Last reply
        0
        • D dodoxor

          Hi, thanks for answer. I'know there's the event onmousehover but i think what i want is different. when you are on a button,(like start button of windows xp) a yellow rectangle with a help description is shown. How can i do this? Thanks , regards

          M Offline
          M Offline
          Manas Bhardwaj
          wrote on last edited by
          #4

          dodoxor wrote:

          when you are on a button,(like start button of windows xp) a yellow rectangle with a help description is shown. How can i do this?

          This piece of code should do for you : private void startButton_MouseHover(object sender, System.EventArgs e) { startButton.BackColor = Color.Yellow; ToolTip toolTip = new ToolTip(); toolTip.ShowAlways = true; toolTip.SetToolTip(startButton, "Whatever Message..."); }

          D 1 Reply Last reply
          0
          • M Manas Bhardwaj

            dodoxor wrote:

            when you are on a button,(like start button of windows xp) a yellow rectangle with a help description is shown. How can i do this?

            This piece of code should do for you : private void startButton_MouseHover(object sender, System.EventArgs e) { startButton.BackColor = Color.Yellow; ToolTip toolTip = new ToolTip(); toolTip.ShowAlways = true; toolTip.SetToolTip(startButton, "Whatever Message..."); }

            D Offline
            D Offline
            dodoxor
            wrote on last edited by
            #5

            Thanks a lot is working. I 've also tried to put ToolTip toolTip = new ToolTip(); toolTip.ShowAlways = true; toolTip.SetToolTip(startButton, "Whatever Message..."); in the Form_load event and is work too. Thanks, bye.

            1 Reply Last reply
            0
            • D dodoxor

              Hello to everyone. I've a window form application in c++ and i've a button in it. How can i add the properties that when the mouse is over the control a description of the control is shown? Thanks for answers regards.

              V Offline
              V Offline
              vims
              wrote on last edited by
              #6

              Set tooltip property at design time , if the button is created dynamically then user code to set tooltip property

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups