how to perform a mouse operation
-
- Posts: 26
- Joined: Thu Jan 18, 2007 12:04 pm
how to perform a mouse operation
actually I want to draw a rectangle in an editor which is similar to microsoft paint ... but the problem is that I dont have control name of the editor and so I want to go for the co-ordinates of the editor . So could you suggest me some method to perform this task.
Use the Mouse.MoveToControl() method to move the mouse to a point relative to the upper-left corner of the control.
The following code draws a rectangle in paint:
Gabor
Ranorex Team
The following code draws a rectangle in paint:
Code: Select all
control = form.FindControlName("ControlName");
Mouse.MoveToControl(control, new Point(10, 10));
Mouse.ButtonDown(MouseButtonType.LeftButton);
Mouse.MoveToControl(control, new Point(400, 300));
Mouse.ButtonUp(MouseButtonType.LeftButton);
Ranorex Team
-
- Posts: 26
- Joined: Thu Jan 18, 2007 12:04 pm
it didnt work
actually there is no such method
Mouse.MoveToControl(CyCanvas, new Point(400, 300));
...I have method to Mouse.MoveToControl(CyCanvas);
can u tell me in which version this method is available.
I am using Ranorex-0.9.2.
Mouse.MoveToControl(CyCanvas, new Point(400, 300));
...I have method to Mouse.MoveToControl(CyCanvas);
can u tell me in which version this method is available.
I am using Ranorex-0.9.2.