Ranorex

how to perform a mouse operation

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
arishahsan



Joined: 18 Jan 2007
Posts: 26

PostPosted: 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
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: 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
View user's profile Send private message Visit poster's website
arishahsan



Joined: 18 Jan 2007
Posts: 26

PostPosted: 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
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: 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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum