Jump to content

phlsti

Member
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About phlsti

phlsti's Achievements

0

Reputation

  1. Thanks again, Ryan, this made my holiday!! My code works now, and I have learned alot; appreciate all of your advice. Have a great holiday. Phil
  2. THIS IS NEAT!! Thanks Ryan I used the 'button1.select' method to get the instant response. I had fooled with the mousehover method earlier and there is something like a 400msec delay that gets aggravating if you want to change things NOW hehe. The 'button1.select method works great. At first, I was getting the same response, with the button value changing no matter where I was on (or off) the form, but that was because the form starts up with the button1 active to start with. When I make another button active by clicking on it or hovering over it (using the same logic), it then works only if I am actually hovering over the button1. So, I just have to add something that makes the button inactive when I am not hovering over it, or puts focus elsewhere when I startup or move off the button. I have tried using the MouseEnter method for the form itself, with a Me.Select command, but it doesn't get focus off the button. Will just keep looking. Actually, I want to have 4-6 buttons on the same form that all have this feature so as to be able to vary their values prior to clicking the button. Again, thanks for the help ...... this logic is fascinating, and quite a change from the basic programming I did in the 70's. Phil
  3. Hi Ryan, I'm learning a lot from your code. The numbering works just great now, but unfortunately, the mousewheel can change the number no matter where the mouse is positioned on or off the form. I would think the 'if statement for the button1.focused' would limit changes to just when I am hovering over the button, but no deal. Phil
  4. Using the following code: Private Sub Button1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseWheel Dim zDelta As Int16 = e.Delta / 120 Button1.Text = zDelta.ToString() End Sub I'm trying to get the text on the button to increment up and down when I hover over the button and move the mousewheel. All that happens is the button text goes from 0 to 1 to -1 depending upon which way I move the mousewheel. How do I get it to count up 1,2,3,4,5, etc or down -1,-2,-3,-4,-5,etc for each detent move of the mousewheel. It's probably right in front of me ..... just can't see it. Thanks for any help. Phil
×
×
  • Create New...