Move a form

Ask general questions here.
marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

Move a form

Post by marcushe » Fri Jul 10, 2009 8:27 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Move a form

Post by Support Team » Fri Jul 10, 2009 3:04 pm

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