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