Move a Textbox with the curson in run-time
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hey howzit? I would like to beable to move a textbox that is on my form with my cursor to anywhere on the form in run-time? Is this possible, could you perhaps give me a code snippet? I am very new to C#! Thanks!
-
Hey howzit? I would like to beable to move a textbox that is on my form with my cursor to anywhere on the form in run-time? Is this possible, could you perhaps give me a code snippet? I am very new to C#! Thanks!
Yes it is possible and easy too. Try to play around with "Location" property of your control e.g in MouseMove event try to do following Textbox1.Location = new point(Textbox1.Location.X+/*mouse X cordinate*/,Textbox1.Location.Y+/*mouse Y cordinate*/); I hope it helps!