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
  1. Home
  2. General Programming
  3. C#
  4. Using Mousewheel----help needed?

Using Mousewheel----help needed?

Scheduled Pinned Locked Moved C#
graphicshelpquestion
3 Posts 3 Posters 0 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.
  • R Offline
    R Offline
    Raza5680
    wrote on last edited by
    #1

    hey, I want to use MouseWheel for my drawing application...Idea is to expand and contract a circle depending upon the direction of wheel motion...which function/property to use..? thanks

    R L 2 Replies Last reply
    0
    • R Raza5680

      hey, I want to use MouseWheel for my drawing application...Idea is to expand and contract a circle depending upon the direction of wheel motion...which function/property to use..? thanks

      R Offline
      R Offline
      RepliCrux
      wrote on last edited by
      #2

      It will take more than a function or property to do that. You can use Mouse Move for sure but will have to add drawing and all those things. Try to do a research on System.Drawing.

      1 Reply Last reply
      0
      • R Raza5680

        hey, I want to use MouseWheel for my drawing application...Idea is to expand and contract a circle depending upon the direction of wheel motion...which function/property to use..? thanks

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Hi, there are at least two approaches to do such things. 1. Every shape (line, rectangle, circle, ...) could be a (user-defined) Control; in that case you create and select a shape, then it gets its events fired such as MouseWheel. 2. In a lightweight approach (which I prefer) only one Control is involved (say a Panel) on which you create your drawing. Now it is the Panel itself that gets the events, such as MouseWheel. In both cases, the MouseEventArgs.Delta property will tell you how much the wheel has moved (and the sign of that will tell the direction). You should follow UI design rules as explained in MSDN, concerning SystemInformation.MouseWheelScrollLines :)

        Luc Pattyn [My Articles] [Forum Guidelines]

        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