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. Curser and panel size change

Curser and panel size change

Scheduled Pinned Locked Moved C#
questiontutorial
2 Posts 2 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.
  • Y Offline
    Y Offline
    ytubis
    wrote on last edited by
    #1

    Hi! I am trying to build a form that can resize objects(panels). I am trying to this with cruser change and resize the panel with the mouse with the drag drop events. I included the enter event but the point that I get from System.Windows.Forms.Cursor.Position is not changing no metter where I enter the panel object. Can someone tell me how can I know in which point my mouse is located on the form and see if it equals to the panel. another quastions is how I change the curser in the code??? I could not find a good example for this. Does some one has something or can point me to a good code example?? Thanks :) :)

    L 1 Reply Last reply
    0
    • Y ytubis

      Hi! I am trying to build a form that can resize objects(panels). I am trying to this with cruser change and resize the panel with the mouse with the drag drop events. I included the enter event but the point that I get from System.Windows.Forms.Cursor.Position is not changing no metter where I enter the panel object. Can someone tell me how can I know in which point my mouse is located on the form and see if it equals to the panel. another quastions is how I change the curser in the code??? I could not find a good example for this. Does some one has something or can point me to a good code example?? Thanks :) :)

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

      Hi, Cursor.Position gives screen coordinates (i.e. relative to the top left edge of the screen). you can translate them to relative to the top left edge of some control or form by calling Control.PointToClient Each Control (or Form) has a Cursor property, so change the appearance by myControl.Cursor=Cursors.XXX :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      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