- Local time
- Today, 10:55
- Joined
- Feb 19, 2013
- Messages
- 17,321
Attached is a simple form that enables a user to move or resize a control at runtime utilising the mouse events. There are two controls in this example, a textbox and an image control. The code will work with any control that has mousemove events.
For the purposes of this example I have applied to code directly to the textbox mouse events. The image events calls the equivalent code in a module so you only need to code once and it can be applied to any control that has mousemove events. There are other ways of managing the module code and it could easily be converted to a class from which the events can be assigned to the controls if that was a requirement.
For the purposes of this example I have applied to code directly to the textbox mouse events. The image events calls the equivalent code in a module so you only need to code once and it can be applied to any control that has mousemove events. There are other ways of managing the module code and it could easily be converted to a class from which the events can be assigned to the controls if that was a requirement.