Page 1 of 1
Move a form
Posted: Fri Jul 10, 2009 8:27 am
by marcushe
How to move a form to other coordinates to keep it from interrupt my process?.
I can list other forms whose close button is disabled. Since i can't close it ,i need to lay it aside
Re: Move a form
Posted: Fri Jul 10, 2009 3:04 pm
by Support Team
Hello marcushe!
In your case you can move your form with help of some actions code like:
Ranorex.Form frm = "/form[@controlname='Form1']";
Ranorex.TitleBar tlb = frm.FindChild<Ranorex.TitleBar>();
tlb.MoveTo();
Mouse.ButtonDown(MouseButtons.Left);
tlb.MoveTo("100;100");
Mouse.ButtonUp(MouseButtons.Left);
At first you find the titlebar of your form and then move it to new relativ location on your desktop (e.g 100;100).
Best regards,
Mhosen
Ranorex Support Team