| View previous topic :: View next topic |
| Author |
Message |
arishahsan
Joined: 18 Jan 2007 Posts: 26
|
Posted: Thu Mar 08, 2007 7:01 am Post subject: 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. |
|
| Back to top |
|
 |
admin Site Admin
Joined: 05 Jul 2006 Posts: 351
|
Posted: Thu Mar 08, 2007 8:49 pm Post subject: |
|
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:
Code: click into code to enlarge
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);
Gabor
Ranorex Team |
|
| Back to top |
|
 |
arishahsan
Joined: 18 Jan 2007 Posts: 26
|
Posted: Sat Mar 10, 2007 4:33 pm Post subject: 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. |
|
| Back to top |
|
 |
admin Site Admin
Joined: 05 Jul 2006 Posts: 351
|
Posted: Sat Mar 10, 2007 7:45 pm Post subject: |
|
| arishahsan wrote: |
| can u tell me in which version this method is available. |
You need the version V1.1.0.
The version should be compatible with the V0.9.2
Gabor
Ranorex Team |
|
| Back to top |
|
 |
|